Title: [Plugin: W3 Total Cache] AdRotate solution
Last modified: August 20, 2016

---

# [Plugin: W3 Total Cache] AdRotate solution

 *  [aljuk](https://wordpress.org/support/users/aljuk/)
 * (@aljuk)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-w3-total-cache-adrotate-solution/)
 * I’m posting this for the benefit of anyone, like me, who runs into problems using
   page caching with w3tc and an ad banner randomiser like AdRotate.
 * I tried all the solutions mooted on previous forum posts, like fragmented caching(
   wrapping the call to AdRotate in special tags to exclude it from caching) but
   none of it worked for me – the ads were always cached.
 * This, however, works, and is oh so simple.
 * Simply remove the call to AdRotate (e.g. `<?php echo adrotate_block(1) ?>`) from
   your template file, place it into its own (new) file, and call it into the template
   via a php include instead. Then add this new file to the ‘Never cache the following
   pages:’ list in w3tc. Clear all caches and you should be good to go.
 * [http://wordpress.org/extend/plugins/w3-total-cache/](http://wordpress.org/extend/plugins/w3-total-cache/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [shansta](https://wordpress.org/support/users/shansta/)
 * (@shansta)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-w3-total-cache-adrotate-solution/#post-2636273)
 * Hey, I have tried this… Seems to work well with adsense but still caching other
   advertisers when using <img> tags :/
 *  Thread Starter [aljuk](https://wordpress.org/support/users/aljuk/)
 * (@aljuk)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-w3-total-cache-adrotate-solution/#post-2636276)
 * Ah, tbh I’m only serving ads locally at this point, off my own server (the output
   of which is randomising fine), so have no experience of that at this time. But
   I’d have thought it should be fine since the same principle should apply (ie.
   that the scripts are running live and not cached). Hmm, perhaps my theory has
   a flaw.
 *  Plugin Contributor [Frederick Townes](https://wordpress.org/support/users/fredericktownes/)
 * (@fredericktownes)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-w3-total-cache-adrotate-solution/#post-2636356)
 * It’s best to deliver them with openx or any other javascript based delivery system.
 *  [lin](https://wordpress.org/support/users/thelinso/)
 * (@thelinso)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-w3-total-cache-adrotate-solution/#post-2636363)
 * Hello folks. I had the same problem with W3 Total Cache and AdRotate. I wrote
   a blog entry on my blog with the solution: **“How To use the Banner-Plugin AdRotate
   together with W3 Total Cache’s Page-Cache (W3TC)”**
 * [http://www.pixelbar.be/blog/how-to-use-the-banner-plugin-adrotate-together-with-w3-total-caches-page-cache-w3tc/](http://www.pixelbar.be/blog/how-to-use-the-banner-plugin-adrotate-together-with-w3-total-caches-page-cache-w3tc/)
 * Greetz!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘[Plugin: W3 Total Cache] AdRotate solution’ is closed to new replies.

 * ![](https://ps.w.org/w3-total-cache/assets/icon-256x256.png?rev=1041806)
 * [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/w3-total-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/w3-total-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/w3-total-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/w3-total-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/w3-total-cache/reviews/)

 * 4 replies
 * 4 participants
 * Last reply from: [lin](https://wordpress.org/support/users/thelinso/)
 * Last activity: [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-w3-total-cache-adrotate-solution/#post-2636363)
 * Status: not resolved