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?

    • 3 pts
      638 pts
      LEVEL 6

    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.

    • 53 pts
      13 pts
      LEVEL 1

    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.

    • 56 pts
      85 pts
      LEVEL 3

    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.

    • 802 pts
      9,088 pts
      LEVEL 27

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

    • 466 pts
      6,133 pts
      LEVEL 24

    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.

    • 725 pts
      336 pts
      LEVEL 5


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


    • 802 pts
      9,088 pts
      LEVEL 27

    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.


We pride ourselves on our level of customer support and responsiveness to member requests. Your WordPress experience will never be the same

Become a member

  • PayPal Partner