WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In addition to the normal feed that wordpress produces, i need to publish an additional feed of posts that have a certain custom field value.

I'm a bit lost on where to start. Any tip?

share|improve this question
Do you mean an rss feed? Or do you just want multiple 'loops' of posts on a page? – Zach Lysobey Oct 15 '11 at 18:07
yes i meant an RSS feed. Thx – pixeline Oct 16 '11 at 20:24
up vote 2 down vote accepted

Something like this will add a /feed/special to your site.


function do_special_feed() {
    'meta_key' => 'key',
    'meta_value' => 'value',

After putting it in a plugin or your theme's functions.php or what have you, you'll need to visit the Settings->Permalinks page at least once and save the settings, to get it to rebuild the permalink rules.

share|improve this answer
interesting. In the meantime i implemented a technique seen on Yoast, which works, but is more of a hack than your suggestion. yoast.com/custom-rss-feeds-wordpress – pixeline Oct 16 '11 at 20:01
Yeah, that method of the Page Template seems like a pretty weird hack when the ability to do this sort of thing easily is already built right in to WordPress. Creating custom feeds is easy. – Otto Oct 16 '11 at 21:54
I just tested this code. Any idea why after removing it from functions.php, the feed keeps available ? – Simon Mar 22 '12 at 15:23
Permalinks require a visit to the permalinks page to change. Also, check your caching plugins, if you have any. – Otto Mar 23 '12 at 3:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.