global posts feed defined as is_feed?
I'm noticing that WP Supercache keeps caching the feed generated by this plugin. Is the plugin defining the resulting feed such that is_feed() would return true? If not, how can this change be made with a code insertion?
Everyday at WPMU DEV we help hundreds of WP Users. Become a member today to:
- Download 250+ Premium Plugins and Themes
- Get unlimited support from WordPress Experts
- Get help with your WordPress or BuddyPress projects
Help & Support from WPMU DEV members and staff
Hiya teachforus,
I'm unfamiliar with how wp supercache handles, this but Aaron or Barry should be able to come along and offer some pointers. Thanks for your patience! :D
Check your version of the plugin. Looks like there was a small issue with caching as per this thread:
http://wordpress.org/support/topic/plugin-wp-super-cache-xml-sitemap-feed-not-cached
Considering that they're trying to cache the feed in that thread, maybe the reverse would work?
Get personal, comprehensive and timely support and assistance
from WordPress Experts
Do you want it to cache or not? Usually caching feeds is highly recommended. Supercache is only 30 minutes anyway.
I'd prefer not to cache the feed since, in the evenings, we can can have multiple posts in a 30 minute period that we're trying to have syndication services pick it up correctly (they're polling us more often than 30 minute intervals).
On that thread, which I have read before, it says
A better solution would be to change $wp_query->is_feed to true which is what is_feed() checks. You won't upset any other wp_query variables that way.
I agree with this and it is, in essence, what I was trying to find out. I don't know how to actually set is_feed() to return as true for the duration of the RSS script.
In the top of the plugin (after wp is loaded), you should be able to put:
$wp_query->is_feed = true;
Inserted. Thanks. Can't tell if it's working at the moment, but hopefully so. Google Chrome has decided that this feed is incorrectly declared again, but the feed validates everywhere else. Without being able to check the time stamp, I can't tell if it's working.






Provides a global feed of latest posts from all the sites across your entire network - for your clients, your users or yourself.