Possible to enclose RSS feed posts in if statement?
-
I have succeeded in moving all of my many customizations of WordPress into a custom plugin except 1: I have an if condition in the RSS2 feed right inside “The Loop” to prevent unpublished posts to be displayed in the feed. (This is a workaround due to modifying the Search Everything plugin to include unpublished posts for logged in users, which then, however, allowed them to show up in a search term feed (…/?s=keyword&feed=rss2) for everyone. I think that was why it’s there.)
I was wondering if there is any way, short of replacing the entire feed script, to filter in such an if enclosure. It would go right after “while(have_posts()): the_post();” and before “<item>” and end right before “endwhile;” and after “</item>”.
Alternatively, can I replace the entire Loop (and only The Loop) in the rss feed via a plugin filter?
- The topic ‘Possible to enclose RSS feed posts in if statement?’ is closed to new replies.