Tag Archives: php sessions
Nobody told me that WordPress total jacks up the globals making it near impossible for you to register sessions within WordPress. I tried a couple hacks to enable it via functions.php, I even went as far as ripping out code from the core to get it to work!
In a Google search I stumbled upon the Transient API – oh lordy, yes!
So custom sessions aren’t working for me, transients are the next best thing, they are super easy too!
## STORE TEXT
set_transient($myvar, ‘text I want to store’, 60*60*12);
## RETRIEVE TEXT
## DELETE THE TEXT
All my troubles seem so far away!