RSS by Category – A WordPress Hack

So recently, I had several conversations with others about having RSS feeds by category in WordPress. You can do this in other blog software, why not WordPress?

I found this nice little ditty that will easily display all of your different feeds. For those of us who blog on different subjects, like family or on non-FOSS-related subjects, this is really nice and easy to do. What I found was this page:

http://wordpress.org/support/topic/18679

Thing is, WordPress already has this functionality built-in, but I didn’t actually know how to get the information. I started digging around and found the lovely post above. After adding one line to my wp-content/my-theme/index.php, it was working.

Here is the line I added:

<?php wp_list_cats('sort_column=name&optioncount=1&feed=RSS'); ?>

Here’s one of the feeds WordPress creates for me:

http://blog.herlo.org/category/passion/feed/

This one is with pretty permalinks, if you don’t have mod_rewrite with Apache or are using something else, this won’t work for you.

Pretty simple really. Now I have a list of all of my feeds right underneath my blogroll on my site. I view this as a good improvement, and already have it working with Utah Open Source Planet.  Maybe we all should give this a try, it is really easy!!

Cheers,

Herlo

This entry was posted in Tech. Bookmark the permalink.

2 Responses to RSS by Category – A WordPress Hack

  1. Jordy says:

    Word up Clint,

    I blogged about this same thing here:
    http://jordy.gundy.org/category-specific-feeds-in-wordpress/

    Check it out. :)

  2. Maximus says:

    I would like to see a continuation of the topic

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>