WordPress category feeds

June 17th, 2007

Question: How do I offer folks RSS feeds of specific categories from my blog, rather than just the RSS for the blog itself?

Answer: It's very easy. The PHP that produces the main feed also produces category feeds, you just need to know the right arguments to use in the URL. For example, the RSS for the ITauthor blog is:

http://www.itauthor.com/feed

To specify an RSS2 feed of just the Podcasts category, I use the URL:

http://www.itauthor.com/feed?feed=rss2&cat=26

The only remotely tricky bit is knowing what number to use for the category you want. To get this number, go to your admin pages of your WordPress blog, click Manage and then Categories. The number you need to use is the ID column for the category you want an RSS feed for.

Podcast feed

I use this feature for my podcasts. I use the PodPress plugin for WordPress to add podcasts to my blog. I give these the category Podcasts. I use FeedBurner to publish the RSS feed for my podcasts, but I don't want to pass FeedBurner the RSS feed for my main site, or people will end up getting all sorts of non-podcast stuff in their podcast client. So the URL I give FeedBurner is the one for the Podcasts category.

Potentially similar posts

Leave a comment