Custom WordPress Feeds operators?

I wish to create a feed of my blog which is a feed of two categories OR the feed of some tag and not the feed of some other category

I know how to do “have a feed of this1 + this2 categories”, but how do you do “OR” in a feed URL? (and in general, is more complex operators on the URL possible, and how?)

Links that don’t answer the question (but help define it):

  • http://lorelle.wordpress.com/2006/03/27/customizing-rss-feed-links-for-wordpresscom-and-wordpress-sidebar-widgets/
  • http://dailycupoftech.com/2007/07/25/creating-custom-wordpress-feeds/

1 Answer
1

Feeds are essentially WordPress Loop with customized template. So it will take regular query_posts() arguments in URL. For example see /wp-includes/feed-rss2.php template.

Since query_posts() doesn’t handle OR logic you describe it isn’t possible with URL alone.

You will have to write your own feed template that runs and concatenates two sets of post. I think it will work simply as page template, but can also be hooked into existing feed mechanics, see do_feed().

Leave a Comment