Title: Exclude specific shortcodes from cached?
Last modified: October 15, 2023

---

# Exclude specific shortcodes from cached?

 *  Resolved [Tobias](https://wordpress.org/support/users/tobiaseichner/)
 * (@tobiaseichner)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/exclude-specific-shortcodes-from-cached/)
 * Hello,
   I use a plugin that “rotates” content on my posts and pages: Some ad banners,
   some user quotes and such things. This is done by placing a shortcode on the 
   posts/pages which is replaced with content delivered from this plugin.So my problem
   is that once the HTML content is generated, it becomes cached by WP Super Cache
   and that same content is being delivered until the cache is cleared. So there
   is no real “rotation” happen.Is there a way to exclude content that is inserted
   by shortcodes from being cached? Or any other solution like a setting in WP Super
   Cache I missed? Maybe also a hint for the programmer who wrote the rotating tool
   for me, so he could adapt his plugin?Thanks for your helpTobias.

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

 *  Plugin Author [Donncha O Caoimh (a11n)](https://wordpress.org/support/users/donncha/)
 * (@donncha)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/exclude-specific-shortcodes-from-cached/#post-17126061)
 * [@tobiaseichner](https://wordpress.org/support/users/tobiaseichner/) it’s possible,
   but not easy to do what you want.
 * The plugin can either be rewritten to serve the rotated content through JavaScript,
   or you’ll need to write a Super Cache plugin that replaces a template tag with
   the shortcode output and enable “dynamic caching”. Neither is particularly easy,
   unfortunately.
 * Here are some docs on writing that plugin, but there are example plugins in WP
   Super Cache you can look at for help.
 * [https://jetpack.com/support/wp-super-cache/writing-wp-super-cache-plugins/](https://jetpack.com/support/wp-super-cache/writing-wp-super-cache-plugins/)
 *  Thread Starter [Tobias](https://wordpress.org/support/users/tobiaseichner/)
 * (@tobiaseichner)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/exclude-specific-shortcodes-from-cached/#post-17130557)
 * Thanks for your quick reply and your explanations regarding this issue. It really
   helps me to solve the problem.

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

The topic ‘Exclude specific shortcodes from cached?’ is closed to new replies.

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

 * 2 replies
 * 2 participants
 * Last reply from: [Tobias](https://wordpress.org/support/users/tobiaseichner/)
 * Last activity: [2 years, 7 months ago](https://wordpress.org/support/topic/exclude-specific-shortcodes-from-cached/#post-17130557)
 * Status: resolved