I have a site (running 3.1) that needs to display a different header and footer (for a partner who promotes the site) if a specific querystring is present. For simplicity, http://domain.com/?cobrand=partner is how this works. I am just getting familiar with how the system works, as I didn't create it and I'm trying to discover what it's issues are.
The main theme, then, does the following things:
- Check for a cookie, or a
- If either matches, set the cookie (if it is unset), add the needed HTML, and run an add_filter (
change_template) to switch the theme itself to one that contains the right HTML.
This works well, though I'm not sure how efficient it is. The problem is that I don't think Super Cache ever caches pages that have the querystring. It does run on those pages, as I see the following in the footer everytime:
<!-- Dynamic page generated in 0.413 seconds. --> <!-- Cached page generated by WP-Super-Cache on 2011-03-16 09:28:56 -->
So I think it just doesn't cache anything. Anyone have insights into this? Alternatively, a better method for switching themes and storing the result based simply on a querystring?