• WPChina

    (@wordpresschina)


    I need to create an RSS feed for only one category and another RSS feed for only 3 categories on my blog. I currently have 9 total categories.

    I searched for a plugin and found one but its instructions were not in English (esl_categories_feed.php), so I don’t understand what to do. Can anyone point me to a plugin or method of crafting RSS feeds for specific categories, or even for specific posters/users?

    Tks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • You can specify one or more categories through the url query for your feed. Using default permalinks and the numeric ID for the categor(y|ies):

    ?feed=rss2&cat=1

    And with custom permalinks:

    /feed/rss2/?cat=1

    For multiple categories, just separate them with a comma:

    ?feed=rss2/&cat=1,7,11
    /feed/rss2/?cat=1,7,11

    I want to use that to create Feedburner feeds pointed at various categories. I actually want to “feedburn” one feed for one category, and another for everything else. Problem is, Feedburner barfs on URLs with commas in them.

    I’m trying to hack WordPress so it accepts another character (a hyphen, specifically) as the category separator, but I can’t find where that work gets done. I added this to the very top of wp-rss2.php and to index.php, but it didn’t make any difference:


    if (isset($_GET['cat'])) {
    $_GET['cat'] = preg_replace('/-/', ',', $_GET['cat']);
    }

    When I do that, the comma-separated list of cats in the query string still works, but a hyphen-separated list gives me all posts.

    I can’t seem to find any reference to $_GET[‘cat’] or $request[‘cat’] in any of the code!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Creating RSS feed by using only some of the categories?’ is closed to new replies.