Bobby ??
Forum Replies Created
-
Forum: Plugins
In reply to: [W3 Total Cache] “Never cache pages that use these custom fields”@vmarko Thanks, that works for me!
I had to instead go with this:
if ( ! defined( 'DONOTCACHEPAGE' ) ) define( 'DONOTCACHEPAGE', true );
to avoid PHP error about DONOTCACHEPAGE already being defined when logged in though.
I wonder if that’s because I have “Don’t cache pages for logged in users” enabled?
EDIT: Never mind. It seems to be Query Monitor plugin. Their init function forcefully defines DONOTCACHEPAGE if not already defined.
- This reply was modified 4 years, 10 months ago by Bobby ??.
Forum: Plugins
In reply to: [W3 Total Cache] “Never cache pages that use these custom fields”Unfortunately, “Never cache the following pages” will not work in my case. There are hundreds of PAGES that I want to exclude, and their URLs are not prefixed with any common phrases. As in, they’re all indeed domain.com/page-title/, and all of their titles are vastly different from each other.
The only thing they have in common is that they have a custom field named “category_id”, but the values of that field are also different from page to page.
The field is used by my custom PAGE template to list POSTS in the provided category ID, inside the PAGES (something like a Table of Contents, if you will).So, I do not need Page Caching for these PAGES, because I want them to update immediately.
I already use transients for the POSTS lists/ToC, with my own validation logic, to make sure their transients remain valid as long as they are, well,.. indeed valid.
Thus it’d be great if it could just exclude pages with a certain custom field, regardless of its value.
Or perhaps, exclude pages of a certain page template?- This reply was modified 4 years, 10 months ago by Bobby ??.