Title: omitting certain element from caching
Last modified: November 15, 2018

---

# omitting certain element from caching

 *  Resolved [Supplement Genie](https://wordpress.org/support/users/supplementgenie/)
 * (@supplementgenie)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/omitting-certain-element-from-caching/)
 * I have a recently viewed products widget that appears at the bottom of my homepage.
   
   Initially, it is hidden, but when someone views some products and goes back to
   the homepage, the widget then displays itself.
 * The problem I am finding is that the page cache generates when the customer looks
   at the homepage for the first time, after that they might look at some products,
   then when they then come back to the homepage, the widget does not display because
   the cache for that page has been saved earlier.
 * Is there a way to omit this widget from the caching?

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

 *  Plugin Support [Dimitris – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support6/)
 * (@wpmudev-support6)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/omitting-certain-element-from-caching/#post-10888854)
 * Hello there [@supplementgenie](https://wordpress.org/support/users/supplementgenie/),
 * hope you’re doing good and thanks for reaching us! 🙂
 * There’s a define that can be used, but this is for whole pages than specific 
   widgets.
    `define('DONOTCACHEPAGE', true);`
 * I’m also pinging [@vanyukov](https://wordpress.org/support/users/vanyukov/) in
   here (plugin author), in case I miss a workaround that could be applied in a 
   case like this.
 * Thank you,
    Dimitris
 *  [Anton Vanyukov](https://wordpress.org/support/users/vanyukov/)
 * (@vanyukov)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/omitting-certain-element-from-caching/#post-10893881)
 * [@supplementgenie](https://wordpress.org/support/users/supplementgenie/),
 * I’m not sure how your widget plugin works, but at the moment in Hummingbird, 
   you can either exclude a page from caching completely, or rely on js-based widgets.
   For example, if you were to do conditional logic (when to show the widget) in
   JavaScript, it would not matter if the page was cached or not. Another solution
   would be to store the status in a WooCommerce cookie. But, again, I’m not familiar
   with what widget you are using and how it is configured.
 * Best regards,
    Anton
 *  Plugin Support [Dimitris – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support6/)
 * (@wpmudev-support6)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/omitting-certain-element-from-caching/#post-10922748)
 * Hello there [@supplementgenie](https://wordpress.org/support/users/supplementgenie/),
 * I’m marking this as resolved due to recent inactivity. Feel free to post back
   any updates and we can happily re-open it and carry on troubleshooting. 🙂
 * Take care,
    Dimitris

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

The topic ‘omitting certain element from caching’ is closed to new replies.

 * ![](https://ps.w.org/hummingbird-performance/assets/icon-256x256.gif?rev=2633221)
 * [Hummingbird Performance - Cache & Page Speed Optimization for Core Web Vitals | Critical CSS | Minify CSS | Defer CSS Javascript | CDN](https://wordpress.org/plugins/hummingbird-performance/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/hummingbird-performance/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/hummingbird-performance/)
 * [Active Topics](https://wordpress.org/support/plugin/hummingbird-performance/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/hummingbird-performance/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/hummingbird-performance/reviews/)

## Tags

 * [cache](https://wordpress.org/support/topic-tag/cache/)
 * [homepage](https://wordpress.org/support/topic-tag/homepage/)
 * [widget](https://wordpress.org/support/topic-tag/widget/)

 * 3 replies
 * 3 participants
 * Last reply from: [Dimitris – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support6/)
 * Last activity: [7 years, 5 months ago](https://wordpress.org/support/topic/omitting-certain-element-from-caching/#post-10922748)
 * Status: resolved