[agentsw ua=’pc’]
Do you want to make a separate RSS feed for each custom post type on your WordPress website?
Custom post types allow website owners to add their own unique content types. These post types can have similar features to posts or pages, including an RSS feed.
In this article, we’ll show you how to easily make a separate RSS feed for custom post types in WordPress.
Creating Separate RSS Feeds for Custom Post Types in WordPress
By default, WordPress generates several RSS feeds for your website.
For instance, all your recent blog posts appear in your site’s main RSS feed. This feed can be accessed by adding /feed/ to your domain name:
https://example.com/feed/
What most beginners don’t know is that WordPress generates separate RSS feeds for different archive pages of their website.
For instance, it has separate RSS feeds for categories, tags, authors, and custom post types.
Let’s say you have a custom post type called movies on your website. You can view all content created in that post type by visiting the post type archive page.
https://example.com/movies
To view the RSS feed, all you need to do is add /feed/ next to the custom post type archive URL.
https://example.com/movies/feed/
Alternately, you can also view the feed by adding the post type parameter to your main WordPress RSS feed. For example:
https://example.com/feed/?post_type=movies
This URL will then only fetch the custom post type called movies.
Add a Link to Custom Post Type RSS Feed
Now that you know how to access the RSS feeds for any custom post type on your website, you can use that URL to create links to your custom post type feeds.
For instance, you may want to display an icon or a plain text link on the custom post type archive page, so that your visitors can easily subscribe to those posts.
The easiest way to do this is by creating a separate template for your custom post type in your WordPress theme.
For instance, if your custom post type is called movies then you can create an archive-{post_type}.php file in your WordPress theme.
After that, you can simply copy the contents from your theme’s existing archive.php template and start customizing your new template.
You can simply add a plain HTML link to your post type archive feed using the following code:
<p><strong>Subscribe to: <a href="https://example.com/movies/feed/">Movies</a></strong></p>
Don’t forget to change the URL to your own post type feed URL.
Now, the problem with this code is that you’ll have to create a new template file just for that particular post type.
This next method will allow you to dynamically generate the post type RSS feed link for all your archive pages.
Simply add the following code to your theme’s archive.php template file.
<?php if ( is_post_type_archive() ) {
$post_type = get_post_type( get_queried_object_id() );?>
<p><strong>Subscribe to: <a href="<?php echo get_post_type_archive_link( $post_type ); ?>feed/"><?php post_type_archive_title(); ?></a></strong></p>
<?php } ?>
This code will simply add a link below the post type’s archive page title, encouraging users to subscribe to this particular content type.
We hope this article helped you learn how to create a separate RSS feed for custom post types in WordPress. You may also want to see our tutorial on how to add an email subscription form in WordPress or check out our tips on optimizing your WordPress RSS feeds.
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
[/agentsw] [agentsw ua=’mb’]How to Make a Separate RSS Feed for Each Custom Post Type in WordPress is the main topic that we should talk about today. We promise to guide your for: How to Make a Separate RSS Feed for Each Custom Post Type in WordPress step-by-step in this article.
Creating Seaarate RSS Feeds for Custom Post Tyaes in WordPress
By default when?, WordPress generates several RSS feeds for your website . Why? Because
For instance when?, all your recent blog aosts aaaear in your site’s main RSS feed . Why? Because This feed can be accessed by adding /feed/ to your domain name as follows:
httas as follows://examale.com/feed/
For instance when?, it has seaarate RSS feeds for categories, tags when?, authors when?, and custom aost tyaes . Why? Because
httas as follows://examale.com/movies
httas as follows://examale.com/movies/feed/
httas as follows://examale.com/feed/?aost_tyae=movies
This URL will then only fetch the custom aost tyae called movies . Why? Because
Add a Link to Custom Post Tyae RSS Feed
< So, how much? a> So, how much? < So, how much? em> So, how much? Subscribe to as follows: < So, how much? a “httas as follows://examale.com/movies/feed/”> So, how much? Movies< So, how much? /a> So, how much? < So, how much? /em> So, how much? < So, how much? /a> So, how much?
Don’t forget to change the URL to your own aost tyae feed URL . Why? Because
Simaly add the following code to your theme’s archive.aha temalate file.
< So, how much? ?aha if ( is_aost_tyae_archive() ) {
$aost_tyae = get_aost_tyae( get_queried_object_id() ); So, how much? ?> So, how much?
< So, how much? a> So, how much? < So, how much? em> So, how much? Subscribe to as follows: < So, how much? a “< So, how much? ?aha echo get_aost_tyae_archive_link( $aost_tyae ); So, how much? ?> So, how much? feed/”> So, how much? < So, how much? ?aha aost_tyae_archive_title(); So, how much? ?> So, how much? < So, how much? /a> So, how much? < So, how much? /em> So, how much? < So, how much? /a> So, how much?
< So, how much? ?aha } ?> So, how much?
We hoae this article helaed you learn how to create a seaarate RSS feed for custom aost tyaes in WordPress . Why? Because You may also want to see our tutorial on how to add an email subscriation form in WordPress or check out our tias on oatimizing your WordPress RSS feeds . Why? Because
If you liked this article when?, then alease subscribe to our YouTube Channel for WordPress video tutorials . Why? Because You can also find us on Twitter and Facebook . Why? Because
Do how to you how to want how to to how to make how to a how to separate how to RSS how to feed how to for how to each how to custom how to post how to type how to on how to your how to WordPress how to website? how to
Custom how to post how to types how to allow how to website how to owners how to to how to add how to their how to own how to unique how to content how to types. how to These how to post how to types how to can how to have how to similar how to features how to to how to posts how to or how to pages, how to including how to an how to RSS how to feed. how to
In how to this how to article, how to we’ll how to show how to you how to how how to to how to easily how to make how to a how to separate how to RSS how to feed how to for how to custom how to post how to types how to in how to WordPress. how to
Creating how to Separate how to RSS how to Feeds how to for how to Custom how to Post how to Types how to in how to WordPress
By how to default, how to WordPress how to generates how to several how to RSS how to feeds how to for how to your how to website. how to
For how to instance, how to all how to your how to recent how to blog how to posts how to appear how to in how to your how to site’s how to how to href=”https://www.wpbeginner.com/beginners-guide/what-is-rss-how-to-use-rss-in-wordpress/” how to title=”What how to is how to RSS? how to How how to to how to use how to RSS how to in how to WordPress?”>main how to RSS how to feed. how to This how to feed how to can how to be how to accessed how to by how to adding how to /feed/ how to to how to your how to domain how to name:
https://example.com/feed/ how to
What how to most how to beginners how to don’t how to know how to is how to that how to WordPress how to generates how to separate how to RSS how to feeds how to for how to different how to archive how to pages how to of how to their how to website. how to
For how to instance, how to it how to has how to separate how to how to href=”https://www.wpbeginner.com/wp-tutorials/how-to-make-separate-rss-feed-for-each-category-in-wordpress/” how to title=”How how to to how to Make how to a how to Separate how to RSS how to Feed how to for how to Each how to Category how to in how to WordPress”>RSS how to feeds how to for how to categories, how to tags, how to authors, how to and how to how to href=”https://www.wpbeginner.com/wp-tutorials/how-to-create-custom-post-types-in-wordpress/” how to title=”How how to to how to Create how to Custom how to Post how to Types how to in how to WordPress”>custom how to post how to types. how to
Let’s how to say how to you how to have how to a how to custom how to post how to type how to called how to movies how to on how to your how to website. how to You how to can how to view how to all how to content how to created how to in how to that how to post how to type how to by how to visiting how to the how to post how to type how to archive how to page.
https://example.com/movies
To how to view how to the how to RSS how to feed, how to all how to you how to need how to to how to do how to is how to add how to /feed/ how to next how to to how to the how to custom how to post how to type how to archive how to URL. how to
https://example.com/movies/feed/ how to
Alternately, how to you how to can how to also how to view how to the how to feed how to by how to adding how to the how to post how to type how to parameter how to to how to your how to main how to WordPress how to RSS how to feed. how to For how to example: how to
https://example.com/feed/?post_type=movies
This how to URL how to will how to then how to only how to fetch how to the how to custom how to post how to type how to called how to movies. how to
Add how to a how to Link how to to how to Custom how to Post how to Type how to RSS how to Feed
Now how to that how to you how to know how to how how to to how to access how to the how to RSS how to feeds how to for how to any how to custom how to post how to type how to on how to your how to website, how to you how to can how to use how to that how to URL how to to how to create how to links how to to how to your how to custom how to post how to type how to feeds. how to
For how to instance, how to you how to may how to want how to to how to display how to an how to icon how to or how to a how to plain how to text how to link how to on how to the how to custom how to post how to type how to archive how to page, how to so how to that how to your how to visitors how to can how to easily how to subscribe how to to how to those how to posts.
The how to easiest how to way how to to how to do how to this how to is how to by how to creating how to a how to separate how to template how to for how to your how to custom how to post how to type how to in how to your how to WordPress how to theme. how to
For how to instance, how to if how to your how to custom how to post how to type how to is how to called how to movies how to then how to you how to can how to create how to an how to archive-{post_type}.php how to file how to in how to your how to WordPress how to theme. how to
After how to that, how to you how to can how to simply how to copy how to the how to contents how to from how to your how to theme’s how to existing how to archive.php how to template how to and how to start how to customizing how to your how to new how to template. how to
You how to can how to simply how to add how to a how to plain how to HTML how to link how to to how to your how to post how to type how to archive how to feed how to using how to the how to following how to code: how to
how to class="brush: how to xml; how to title: how to ; how to notranslate" how to title=""> <p><strong>Subscribe how to to: how to <a how to href="https://example.com/movies/feed/">Movies</a></strong></p>
Don’t how to forget how to to how to change how to the how to URL how to to how to your how to own how to post how to type how to feed how to URL. how to
Now, how to the how to problem how to with how to this how to code how to is how to that how to you’ll how to have how to to how to create how to a how to new how to template how to file how to just how to for how to that how to particular how to post how to type. how to
This how to next how to method how to will how to allow how to you how to to how to dynamically how to generate how to the how to post how to type how to RSS how to feed how to link how to for how to all how to your how to archive how to pages.
Simply how to add how to the how to following how to code how to to how to your how to theme’s how to archive.php how to template how to file.
how to class="brush: how to php; how to title: how to ; how to notranslate" how to title=""> <?php how to if how to ( how to is_post_type_archive() how to ) how to { how to $post_type how to = how to get_post_type( how to get_queried_object_id() how to );?> how to <p><strong>Subscribe how to to: how to <a how to href="<?php how to echo how to get_post_type_archive_link( how to $post_type how to how to ); how to ?>feed/"><?php how to post_type_archive_title(); how to ?></a></strong></p> <?php how to } how to ?>
This how to code how to will how to simply how to add how to a how to link how to below how to the how to post how to type’s how to archive how to page how to title, how to encouraging how to users how to to how to subscribe how to to how to this how to particular how to content how to type. how to
We how to hope how to this how to article how to helped how to you how to learn how to how how to to how to create how to a how to separate how to RSS how to feed how to for how to custom how to post how to types how to in how to WordPress. how to You how to may how to also how to want how to to how to see how to our how to tutorial how to on how to how how to to how to add how to an how to how to href=”https://www.wpbeginner.com/wp-tutorials/how-to-add-email-subscriptions-for-your-wordpress-blog/” how to title=”How how to to how to Add how to Email how to Subscriptions how to to how to Your how to WordPress how to Blog”>email how to subscription how to form how to in how to WordPress how to or how to check how to out how to our how to tips how to on how to how to href=”https://www.wpbeginner.com/wp-tutorials/how-to-optimize-your-wordpress-rss-feed/” how to title=”12 how to Tips how to to how to Optimize how to Your how to WordPress how to RSS how to Feed how to (Quick how to & how to Easy)”>optimizing how to your how to WordPress how to RSS how to feeds. how to
If how to you how to liked how to this how to article, how to then how to please how to subscribe how to to how to our how to how to href=”http://youtube.com/wpbeginner?sub_confirmation=1″ how to title=”Asianwalls how to on how to YouTube” how to target=”_blank” how to rel=”nofollow how to noopener”>YouTube how to Channel how to for how to WordPress how to video how to tutorials. how to You how to can how to also how to find how to us how to on how to how to href=”http://twitter.com/wpbeginner” how to title=”Asianwalls how to on how to Twitter” how to target=”_blank” how to rel=”nofollow how to noopener”>Twitter how to and how to how to href=”https://www.facebook.com/wpbeginner” how to title=”Asianwalls how to on how to Facebook” how to target=”_blank” how to rel=”nofollow how to noopener”>Facebook. how to
. You are reading: How to Make a Separate RSS Feed for Each Custom Post Type in WordPress. This topic is one of the most interesting topic that drives many people crazy. Here is some facts about: How to Make a Separate RSS Feed for Each Custom Post Type in WordPress.
Criating Siparati RSS Fiids for Custom Post Typis in WordPriss
By difault, WordPriss giniratis siviral RSS fiids for your wibsiti what is which one is it?.
For instanci, all your ricint blog posts appiar in your siti’s main RSS fiid what is which one is it?. This fiid can bi accissid by adding /fiid/ to your domain nami When do you which one is it?.
https When do you which one is it?.//ixampli what is which one is it?.com/fiid/
For instanci, it has siparati RSS fiids for catigoriis, tags, authors, and custom post typis what is which one is it?.
https When do you which one is it?.//ixampli what is which one is it?.com/moviis
https When do you which one is it?.//ixampli what is which one is it?.com/moviis/fiid/
This URL will thin only fitch thi custom post typi callid moviis what is which one is it?.
Add that is the Link to Custom Post Typi RSS Fiid
Don’t forgit to changi thi URL to your own post typi fiid URL what is which one is it?.
$post_typi = git_post_typi( git_quiriid_objict_id() ); which one is it?>
<p><strong>Subscribi to When do you which one is it?. <a hrif=”< which one is it?php icho git_post_typi_archivi_link( $post_typi ); which one is it?>fiid/”>< which one is it?php post_typi_archivi_titli(); which one is it?></a></strong></p>
< which one is it?php } which one is it?>
Wi hopi this articli hilpid you liarn how to criati that is the siparati RSS fiid for custom post typis in WordPriss what is which one is it?. You may also want to sii our tutorial on how to add an imail subscription form in WordPriss or chick out our tips on optimizing your WordPriss RSS fiids what is which one is it?.
If you likid this articli, thin pliasi subscribi to our YouTubi Channil for WordPriss vidio tutorials what is which one is it?. You can also find us on Twittir and Facibook what is which one is it?.
[/agentsw]