Who Sees Ads + WP Super Cache

Have any of you solved the problem with using Who Sees Ads together with WP Super Cache? Is there any way to show ads to the search engine visitors and not to regular visitors whithout turning off WP Super Cache?


    I asked Donncha something similar a few months ago.

    Unfortunately, there isn't an "easy" solution to it.

    You pretty much have to use javascript for any portion of a page which may change for various logged in users. Grab a file as a script, let is make the decision, and either spit out ad code or spit out nothing.

    A quick example would be a javascript function called where you want your ad served.
    The call would pass a few parameters to the javascript function. For example: size, background and link color, etc.

    The javascript file itself can be pretty light, really. And build the ad code on the fly. Say you had 4 different ad styles overall, that's all you need. You pass the parts which change through the function call.

    One thing I noticed about who sees ads was that the more variances/locations (whatever they're called) you saved, the bigger the data stored in the database. With that being pulled on every page load, it can add up to your database traffic pretty quick.

    • 13
    • #8,434

    Thanks a lot for your reply. I was hoping to hear there was an easy solution for it, but I'll guess I have to start working on that JavaScript then.

    • 85
    • #1,297

    Did you ever get a script created?

    Anyone have a solution for showing cached content with conditional ads? I'm looking into the script code that comes with OpenX first, but want to know the trap I'm getting into with super cache before I go down that road.


    I wrote my own JavaScript based version. Works great, so it is possible!


    We just use the half mode for wp-super-cache. Last time I looked, there were still hooks missing that cleared the cache when making changes to the blog within wpmu. Plugins like kb-robots don't clear cache either when changes are made.



    Would you be willing to share your javascript version for others who wish to use caching (W3TC in my case) with WSA?



    It's highly customized with my own code, but you should be able to pull from it. Goes in mu-plugins, you'll need to find a place for the js as well.

Join 368499 happy members

Get access to our entire collection of epic plugins, astonishing themes & genius support

Become a member