WordPress Guy

WordPress Guy designs and develops WordPress themes and plugins. WordPress Guy teaches you WordPress stuff.

Did you know that WordPress comes with the ability to publish category feeds? That’s right, you can give that option to your readers by providing them with the category feed. Or, you can subscribe to a blog where you’re only interested in one of the categories.

If you’re using “pretty” permalinks:


Or if you’re using query string permalinks (the un-pretty ones):


Where 14 is the ID of the category.

You can add this to your archive.php with the following code:

<?php if(is_category()) : ?>
<a href="<?php echo bloginfo("url") . "/wp-rss2.php?cat=$cat" ?>">Subscribe to the <?php single_cat_title(); ?> category</a>
<?php endif; ?>

Cool eh!


  • July 30th, 2008 at 10:13 am

    Thank for that code.

Your Comment