How to Create WordPress Category RSS Feeds

WordPress RSS Shop

Here’s a fun fact I bet you didn’t know: WordPress provides built-in feeds for every category, tag, comment, post, author, and even search result.

The problem is, how do WordPress users know where the feeds are and how to utilize them? Well, unless your theme already has this setup, you really don’t. This tutorial will show you how to dynamically create and display WordPress category-specific feed icons.

Why are category-specific feeds important?

Some people aren’t interested in a general rss feed. They want to follow a specific category. For example, our new Marketplace includes several different categories (i.e. Child Themes, Plugins, Payment Gateways, etc).

If you’re interested in all new items, you can subscribe to the general rss feed. On the other hand, say you only care about new payment gateways and don’t want your AppThemes rss feed cluttered up with new child theme items.

Step 1 – Add one cup code

Edit your category.php theme file and paste in the following code somewhere towards the top. This will display the feed link. If you don’t have category.php, you’ll either need to create it (advanced users) or edit your archive.php template which is the fall thru template.

if ( is_category() ) {
  // retrieve current category object
  $category = get_category( get_query_var('cat') );
  if ( ! empty( $category ) )
    echo '<div class="category-feed"><a href="' . get_category_feed_link( $category->cat_ID ) . '" title="' . sprintf( __( 'Subscribe to the &quot;%1$s&quot; category', 'appthemes' ), $category->name ) . '" rel="nofollow">Subscribe!</a></div>';

You’ll notice we did a couple of things. First, get the current category object. Then grab the feed link using get_category_feed_link(). We also added a title tag which is useful when hovering over an icon (instead of using text) and a rel="nofollow" so we don’t leak SEO juice.

Note: We wrapped an extra if is_category() check around the code so it would work in archive.php.

Step 2 – Test it out

Visit any of your category pages and you should see a “Subscribe!” link. If you hover over the link, you’ll notice it’s unique for the category. Great! You’ve got it working now. Next, we need to pretty it up.

Step 3 – Put on some makeup

We wrapped the link with a div so it’s easy to style the link. If you want to use just an icon instead of the text link like we did, you can do that too. Just remove the “Subscribe!” text from the code and include an rss icon in the css. You will paste this in your theme’s style.css file. Here’s what we used:

.category-desc { 
.category-feed a { 
    background:url('images/rss-icon.png') no-repeat left 0 transparent; 
.category-feed a:hover { 

You’ll likely need to make some tweaks before it’s perfect but that’s pretty much it!

Like this tutorial? Subscribe and get the latest tutorials delivered straight to your inbox or feed reader.

Your rating: none
Rating: 3.3 - 10 votes

Written by: on September 6, 2012. Last modified: September 7, 2012

Popular Marketplace Items

  • thumnail

    Category Icons

    Add icons to your ClassiPress categories
  • critic-icon-2


    A professional review and rating system for WordPress.
  • 2Checkout Payment Gateway Plugin


    Accept up to eight payment methods, fifteen languages, & twenty six currencies.
  • GeoReg thumbnail


    Captures detailed geographic info with new user registrations.
  • autoauto-thumbnail

    AutoResponder AutoRegistration

    Automatically integrates WordPress registration with major autoresponders.
  • at_autosuggest_taskerr_thumb

    AutoSuggest – Taskerr

    Automatically suggests services as the user types.
  • classipress-fortumosms-gateway

    Fortumo SMS payment gateway

    Fortumo sms payment gateway for ClassiPress
  • Custom Greeting

    Custom Greeting

    Easily replace the default WordPress greeting.
  • classpress tabber


    Show specific custom fields as tabs on an ad detail page.
  • stripe-plugin


    Process credit cards safely and securely on your AppThemes website.
  • StarStruck WordPress Plugin Thumbnail


    A fast, lightweight, and elegant star rating system for comments, pages, & posts.
  • adposter-blocker-thumbnail

    AdPoster Blocker

    A simple but powerful plugin that blocks spammy new user regs and/or ads/jobs/posts.
  • featured

    QR Codes Widget

    Add a widget with QR codes to your AppThemes site.
  • AppThemes Coupon Plugin

    AppThemes Coupons

    An easy way to start offering coupons and promotions to your customers.
  • Authorize.Net Thumbnail


    Easily start accepting online payments via credit card and e-check.
  • wp-smart-export-final

    WP Smart Export

    A highly customizable WordPress data exporter plugin.
  • woo_goodstore_thumb


    A clean, modernĀ and fully responsive WooCommerce Fashion Theme.
  • daddy-likes-190x130

    Daddy Like

    A fast, lightweight, and elegant "like" system for comments, pages, posts, & activities.
  • balanced-payments-plugin-sm

    Balanced Payments

    Accept credit cards and setup escrow payments.
  • screenshot


    A conversion focused responsive Clipper child theme with premium features.
  • woo_marine_thumb


    A clean, modernĀ and fully responsive marine-based goods WooCommerce Theme.
  • pcp-featured

    Price Comparer

    Jump start your Price Comparision site with products from Amazon, Commission Junction, and LinkShare.