RSS by Category – A WordPress HackTue, Jul 11, 2006
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:
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:
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!!