Blog: WordPress
Communications tower time lapse under starry sky

Create A Custom Post Type RSS Feed In WordPress

Avatar for John Locke

John Locke is a SEO consultant from Sacramento, CA. He helps manufacturing businesses rank higher through his web agency, Lockedown Design & SEO.

Most WordPress themes output a RSS feed for Posts (standard blog posts) and Comments by default in the <head>.

Posts are basically used for a normal blogging function. Post types are also used for Pages, Attachments, Revisions, and Navigation Menus.

But since 2010, WordPress has supported custom post types, beyond these core five. This has allowed theme and plugin developers to create different varieties of serialized posts. These can definitely be blog-like taxonomies, but many are used in creative ways by plugins (for example, scheduling events or bookings).

But let’s say you simply have a few custom post types on your site that basically read like a sequential blog, and you want to add a RSS feed for each of those. How do you go about doing that?

Add Custom Post Type RSS Feeds To Your WordPress Site

To add RSS support for any custom post types you have on your site, just add the the regular feed URL, with a query string indicating the post type.

For a custom post type with a slug of your-cpt, the RSS feed link would look like this:


<link rel="alternate" type="application/rss+xml" title="Your CPT Feed" href="http://www.examplesite.com/feed/?post_type=your-cpt" />

Custom Post Types And Taxonomies In An RSS Feed

If you create a custom taxonomy for your custom post type, you can create a custom RSS feed for just those posts.

Categories and tags are two types of built in taxonomies, or ways of organizing posts.

Though it’s not common for simpler sites to have custom taxonomies, there may be times where it makes a lot of sense to create custom taxonomies on more complex sites, and then associate those with certain custom post types. As always, I advise using a third party plugin (like Types) to create custom post types and taxonomies, so you can change themes later without losing your data.

Let’s say you’ve created a taxonomy named Manufacturer for your custom post type. Since taxonomies work similar to categories, you can add several sub-taxonomies.

For the purposes of this tutorial, let’s imagine you want to add an RSS feed for the sub-taxonomy Acme in the taxonomy Manufacturer in the custom post type Partners. We’d use an ampersand (& symbol) to add that info to our query string.


<link rel="alternate" type="application/rss+xml" title="Your CPT Feed" href="http://www.examplesite.com/feed/?post_type=partners&manufacturer=acme" />

Categories in RSS Feed

This is slightly different than the method used for creating RSS feeds for a specific category. For normal Posts, you can simply take the category URL and put /feed/ in front of it, like so:


<link rel="alternate" type="application/rss+xml" title="Your CPT Category Feed" href="http://www.examplesite.com/category/your-category/feed/" />

Avatar for John Locke

John Locke is a SEO consultant from Sacramento, CA. He helps manufacturing businesses rank higher through his web agency, Lockedown Design & SEO.

Join the Conversation

Your email address will be kept private. Required fields marked *.