• Resolved Supplement Genie

    (@supplementgenie)


    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

    (@wpmudev-support6)

    Hello there @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 in here (plugin author), in case I miss a workaround that could be applied in a case like this.

    Thank you,
    Dimitris

    @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

    (@wpmudev-support6)

    Hello there @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.