I have a menu in the blog displaying some links and I would like that some visitors can activate additional links in the menu adding a parameter in the url of the page they are visiting, something like:
The query string
?new saves a value in a $_SESSION variable, so the visitor sees the additional links in all pages of the blog, until he make a sort of logout adding
?out to the end of the URL and everything return back like before.
I understand that is a sort of login, but I don't want that my visitors have to register. Is a temporary solution, that works good for me and I need it for the next two or three months.
The problem is that in my site I use WP Super Cache (version 0.7.1). It's a very good plugin, and I want to use it, but I would like to know if it is possible to exclude some visitors if exists a certain SESSION variable (or a cookie).
I gave a look to the No advert for friends plugin, but I don't understand exactly how it works - I tried also to use Super cache hooks, but no way to make them work.
I've found a quick and dirty solution: I added an if statement in wp-cache-config.php to check if my SESSION variable is set and in this case the Super cache Plugin is deactivated. It works, but I'm looking for a more elegant solution... so, any help would be very very appreciated.
In addition, it seems that the cache is active also when logged users visit the sites... is that correct or there's something wrong?
Thanks in advance!