Create Separate Feed, Excluded from Main feed (4 posts)

  1. TomJohnson
    Posted 9 years ago #

    I want to create a separate feed whose categories are excluded from the site's main feed.

    More detail: I have both a podcast and blog on my blog. I want to offer separate feeds for each. All categories labeled Blog should be excluded from the site's main feed. However, the Blog category should be available in its own feed.

    I've searched for answers on this on the codex and support forums without finding a solution. I found this post http://wordpress.org/support/topic/8101?replies=15#post-473730 that said just to add $cat="-15"; above the line that reads require('wp-blog-header.php'); in the wp-rss2.php file. However, my wp-rss2.php file doesn't even have a line that says require('wp-blog-header.php').

    I really like the Category Visbility plugin, but once you exclude a category from the feed using this plugin, I don't know how to create a separate category (my Blog feed).

    I do not want to create two separate installations, because then it becomes a hassle to maintain.

    Can someone help me? Thanks,



  2. Chris_K
    Posted 9 years ago #

    I'm a bit confused.

    You can use the Category Visibility plugin to exclude a specific category ("blog") from your main feed.

    WordPress, by default, has category feeds built in. So couldn't you just have a link for the "blog" feed as well?

  3. TomJohnson
    Posted 9 years ago #

    I tried that. I used the Category Visibility plugin to exclude category #15 from my feed. Then I went to that category's page and took the default feed for that category (appending "feed" to the end of the category's URI). I then tried to subscribe to that category #15 feed, but since it was excluded from the site's feed via the Category Visibility plugin, I couldn't subscribe to it.

  4. TomJohnson
    Posted 9 years ago #

    I found how to exclude a category from my feed. From a post from Kafkaesque:

    Add the following line to the index.php in your blog's root directory (and not to your theme's index.php):
    if( isset($_GET['feed']) ) $cat = -15;

    Where 15 is the category you want to exclude. Also note that I'm using permalinks.


    However, I'm still not sure how to make a second feed that has that category available. When I try to subscribe to just that feed, it's blocked.

    For example, my category 15 feed is named stc. So the feed for just that category should be


    But when I try subscribing to this, it doesn't work. It does work if category 15 is not excluded from the main feed.

    So my question is how to I make it so that category 15 has its own feed, but also so that feed is not included with the main feed of the site? Thanks,


Topic Closed

This topic has been closed to new replies.

About this Topic