WordPress.org

Ready to get started?Download WordPress

Forums

Custom Content by Country (by iControlWP)
[resolved] Custom Content by Country and w3 Total Cache (6 posts)

  1. seekndestroy88
    Member
    Posted 1 year ago #

    Hello,

    I need to solve the issue, as it does not seems working because i have w3Total Cache is installed..

    Please let me know which files to add in

    Cache exception list: (in W3Total Cache)

    Thanks

    http://wordpress.org/extend/plugins/custom-content-by-country/description/

  2. jmzolezzi
    Member
    Posted 1 year ago #

    Indeed I'd love to know what settings could be leave enabled at W3 Total Cache to be able to use Custom Content by Country, without making our site slower.

  3. Paul G.
    Member
    Plugin Author

    Posted 1 year ago #

    I've spent quite a bit of time looking at this, but the fact is when you enable page caching, in general, you cannot dynamically display different content to different users.

    The only solution that I can think of is this:

    For every page/post that uses this shortcode (assuming you're only using it on certain pages and not within your whole site, for example on a footer, or sidebar, I can add the directive to not cache that particular page.

    It means, everything else will follow your caching setting, but that page content will not be cached. I can't yet guarantee that would work.

    So, would this interest either of you if I were to do that? Bearing in mind, you would lose page caching for only those pages that use this code.

    Cheers,
    Paul.

  4. jmzolezzi
    Member
    Posted 1 year ago #

    Indeed it seems the only setting that needs to be disabled for the time being is Page Caching.

    Your idea to disable it automatically on pages where the plugin is being used only is great.

    Here's a thread explaining how to accomplish this, not sure if there's a better or more efficient way.

  5. Paul G.
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks for the link... I would be using the method of setting the define() to not page cache for pages that use the shortcode.

    I'll experiment and see what I can do with it.

    Cheers,
    Paul.

  6. Paul G.
    Member
    Plugin Author

    Posted 1 year ago #

    Alrighty, I decided I liked this idea too much to not wait before putting it in.

    As of version 2.11, there's a global option to disable Page cache for only those pages that use this plugin shortcode. :)

    It's pretty neat, but as always, worth testing out in your environment. If it doesn't seem to work for you, you need to test by logging out of admin from your wordpress site, and clearing browser cookies etc. It was tricky to test this, but I got to a point that I could see it clearly working because of the plugin.

    Hope you like! :)
    Cheers,
    Paul.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic