WordPress.org

Ready to get started?Download WordPress

Forums

WP Super Cache
How to not cache certain pages? (6 posts)

  1. Ruriko
    Member
    Posted 3 years ago #

    How do I make it not cache certain pages? like for example I don't want to cache this page http://www.example.com/about/

  2. Donncha O Caoimh
    Member
    Plugin Author

    Posted 3 years ago #

    Add /about/ to the the list of rejected URIs on the settings page.

  3. tirussell
    Member
    Posted 3 years ago #

    On a weirdly tricked-out multisite setup, I don't want to cache the root-level homepage.

    With my setup, is_frontpage and is_home do not work for the domain root - is there syntax for a string that I can put into the rejected URIs list? The requested URI will be simply "/".

    Because the page is essentially not managed by WP, I could set a PHP variable before the cache plugin loads - is there one that would make the cache plugin not kick in?

  4. Donncha O Caoimh
    Member
    Plugin Author

    Posted 3 years ago #

    define the constant DONOTCACHEPAGE on the front page and it won't be cached.

  5. Celinal
    Member
    Posted 3 years ago #

    For a non tech savvy, I don't understand what you are saying, donncha :P Specifically what do I need to put where?

    I also run a network and only want the main homepage not to be cached, so that the subsites' homepages will still be cached.

  6. tirussell
    Member
    Posted 3 years ago #

    I use the really wonderful Shortcode Exec PHP plugin to insert bits of PHP into arbitrary pages. I created a shortcode using this plugin that simply executed the following:
    define('DONOTCACHEPAGE',1);
    and then put the shortcode on the page I didn't want to cache.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic