Category-specifc RSS feeds from WordPress

I subscribe to some topic-specific blog aggregation feeds, and I get mildly annoyed when posts appear on those things that actually don’t have anything to do with the aggregation’s topic.  I found this off-topic spamming surprising because blogs always have these categories and tags on every message, so what’s the point of all that if you can’t subscribe to a specific category?

It’s not exactly obvious, but it turns out that at least with WordPress blogs (like this one) you can subscribe to a particular category.

First you have to figure out the category number for the topic you’re interested in.  You can usually do that by clicking on the link for the category you’re interested in an looking at the url.  It’ll have part that says something like “cat=4″.   Then you append that onto the regular feed url.  Now you append that onto the base RSS url for the blog.  Like for this blog the base is:

http://www.billbaxter.com/techblog/wp-rss2.php

Use a “?” to tack on the category string and voila!

http://www.billbaxter.com/techblog/wp-rss2.php?cat=4

you have a category-specific feed url (in the case above, for my “code” topic, which current includes D, C++ and Python sub-categories.

Update: It seems WordPress folks changed the URL format they use at some point.  For the version I’m currently using (2.9.2), the format is now:

http://www.billbaxter.com/techblog/?feed=rss2&cat=4

The .php script referencing the type of feed is no longer explicit, and instead both feed type and category are just parameters.

So here are some category-links for my blog here (updated for my WP 2.9.2):

Tags: , , , ,

4 Responses to “Category-specifc RSS feeds from WordPress”

  1. H. Ken says:

    Nice. Wondering if you can add this as a module on the left.

  2. wirabumi says:

    i read your post but still don’t understand what is the meaning..
    how to set up the rss feed? do you have any step by step tutorial for newbe like me? thanks

  3. Kudos from one braniac to another. :)

  4. admin says:

    @wirabumi – If you mean how to get Wordpress to supply RSS feeds, it does that automatically. You shouldn’t have to set up anything. If you mean how to subscribe to an RSS feed, there are many RSS readers. I use Google Reader, myself.

Leave a Reply