{"id":34431,"date":"2022-02-05T15:00:52","date_gmt":"2022-02-05T14:00:52","guid":{"rendered":"https:\/\/qodeinteractive.com\/magazine\/?p=34431"},"modified":"2022-02-03T21:21:36","modified_gmt":"2022-02-03T20:21:36","slug":"how-to-create-rss-feeds-for-each-category-in-wordpress","status":"publish","type":"post","link":"https:\/\/qodeinteractive.com\/magazine\/how-to-create-rss-feeds-for-each-category-in-wordpress\/","title":{"rendered":"How to Create Separate RSS Feeds for Each Category in WordPress"},"content":{"rendered":"<div class=\"wpb-content-wrapper\"><p>[vc_row][vc_column][vc_column_text]Creating content is par for the course if you are running anything like a blog or a magazine, but what you really want is to <strong>make it as easy as possible for people to find and access your content<\/strong>. One way of doing that is getting acquainted with <a href=\"https:\/\/qodeinteractive.com\/magazine\/seo-basics\/\">the basics of SEO<\/a>, while another is to keep your website well organized and sorted into <a href=\"https:\/\/qodeinteractive.com\/magazine\/wordpress-taxonomy\/\">taxonomies<\/a>.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]WordPress taxonomies (categories, tags, and other custom taxonomies) make it easy for your visitors to find the content they are looking for on your website, and there are many ways in which they can do that. You could, for instance, add a <a href=\"https:\/\/qodeinteractive.com\/magazine\/how-to-display-most-popular-wordpress-tags\/\">most popular tag cloud<\/a> to your website, allow your visitors to <a href=\"https:\/\/qodeinteractive.com\/magazine\/how-to-add-search-by-category-feature-in-wordpress\/\">search by category<\/a>, <a href=\"https:\/\/qodeinteractive.com\/magazine\/show-wordpress-recent-posts\/\">display recent posts from a category<\/a>, and more. In this tutorial, we will be showing you how to set up RSS feeds by category in WordPress.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Here\u2018s what we will be covering:<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;22px&#8221;]<ul class=\"qodef-unordered-list-item qodef-toc\">\n    <li>\n\t        <div class=\"qodef-ul-title-holder\">\n            <span class=\"qodef-ul-title-content\"><a href=\"#what-is-an-rss-feed\">What Is an RSS Feed<\/a><\/span>        <\/div>\n            <\/li>\n<\/ul>[vc_empty_space height=&#8221;5px&#8221;]<ul class=\"qodef-unordered-list-item qodef-toc\">\n    <li>\n\t        <div class=\"qodef-ul-title-holder\">\n            <span class=\"qodef-ul-title-content\"><a href=\"#how-to-locate-an-rss-feed-for-a-category\">How to Locate an RSS Feed for a Category<\/a><\/span>        <\/div>\n            <\/li>\n<\/ul>[vc_empty_space height=&#8221;5px&#8221;]<ul class=\"qodef-unordered-list-item qodef-toc\">\n    <li>\n\t        <div class=\"qodef-ul-title-holder\">\n            <span class=\"qodef-ul-title-content\"><a href=\"#how-to-set-up-an-rss-feed-for-a-category\">How to Set Up an RSS Feed for a Category<\/a><\/span>        <\/div>\n            <\/li>\n<\/ul>[vc_empty_space height=&#8221;80px&#8221;][vc_widget_sidebar sidebar_id=&#8221;new-top-picks-banner&#8221;][vc_empty_space height=&#8221;80px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\"><a id=\"what-is-an-rss-feed\"><\/a>What Is an RSS Feed<\/h2>\n<p>[\/vc_column_text][vc_column_text]<strong>RSS stands for Really Simple Syndication<\/strong>: a web feed which allows users to follow updates on websites they want updates from as part of a structured XML document. The document includes a summary of metadata for some of the recent posts published on a website: title, content, excerpt, publication date, categories, and other data.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]In order to access the content, RSS users don\u2018t use a browser, but rather special software called an <strong>RSS feed reader or news aggregator.<\/strong> This software is used to create feeds (typically, but not limited to, news feeds) which the user can tailor to suit their own needs or tastes. WordPress accommodates these users by default: there is an infrastructure already in place.[\/vc_column_text][vc_empty_space height=&#8221;68px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\"><a id=\"how-to-locate-an-rss-feed-for-a-category\"><\/a>How to Locate an RSS Feed for a Category<\/h2>\n<p>[\/vc_column_text][vc_column_text]As we have mentioned in the section above, there is nothing special a WordPress admin or developer needs to do in order for a website RSS feed to exist. For any WordPress website, you can <strong>access its default RSS feed by adding <em>\/feed<\/em> to the website URL.<\/strong>[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]For instance, you can access the Qode Magazine RSS feed on this link:<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]<a href=\"https:\/\/qodeinteractive.com\/magazine\/feed\"><em>https:\/\/qodeinteractive.com\/magazine\/feed<\/em><\/a>[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]However, <strong>you may be interested in a particular category only,<\/strong> rather than the entirety of the content on our website. Say you want to locate the <em>Tutorials<\/em> category, for instance. You can find a link to it under the title of any tutorial article or in the category menu on the left hand-side.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"600\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Tutorials-Category.jpg\" class=\"attachment-full size-full\" alt=\"Tutorials Category\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Tutorials-Category.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Tutorials-Category-300x186.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Tutorials-Category-768x476.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Tutorials-Category-620x384.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]You can, then, access the RSS feed for Qode Magazine\u2018s RSS feed on this link:[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]<a href=\"https:\/\/qodeinteractive.com\/magazine\/category\/tutorials\/feed\"><em>https:\/\/qodeinteractive.com\/magazine\/category\/tutorials\/feed<\/em><\/a>[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Any website, however, can use any number of different and differently named categories for their posts. You can find out what they are for each post from the <strong>Posts<\/strong> screen of your WordPress dashboard.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"518\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Category.jpg\" class=\"attachment-full size-full\" alt=\"Category\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Category.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Category-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Category-768x411.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Category-620x331.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]You can also access and edit them by navigating to <strong>Posts\/Categories<\/strong> from your WordPress dashboard.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"558\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Post-Categories.jpg\" class=\"attachment-full size-full\" alt=\"Post Categories\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Post-Categories.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Post-Categories-300x173.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Post-Categories-768x442.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Post-Categories-620x357.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]A typical WordPress category URL contains <em>category\/slug<\/em> at the end, where slug is the URL-friendly version of the category name.[\/vc_column_text][vc_empty_space height=&#8221;68px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\"><a id=\"how-to-set-up-an-rss-feed-for-a-category\"><\/a>How to Set Up an RSS Feed for a Category<\/h2>\n<p>[\/vc_column_text][vc_column_text]In a sense, we have already answered this: you can easily <strong>share a link to each category\u2018s individual feed<\/strong> or add it as a hyperlink anywhere on your website.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]However, you may delete a category or edit it or its slug at some point, and you or your users will need to manually update all the links for all the feeds they wish to access.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]To do that, you need to make a small modification to your website\u2018s code, specifically, its<em> functions.php<\/em> file. To access it, navigate to <strong>Appearance\/Theme Editor<\/strong> from your WordPress dashboard.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"518\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/08\/Theme-Editor.jpg\" class=\"attachment-full size-full\" alt=\"Theme Editor\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/08\/Theme-Editor.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/08\/Theme-Editor-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/08\/Theme-Editor-768x411.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/08\/Theme-Editor-620x331.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]From the right hand-side menu, select your<em> functions.php<\/em> file and add this code to it, taking care not to disturb any other code:[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">function display_category_feed() {\r\n$html .= '&lt;ul&gt;';\r\n$html .= wp_list_categories( array(\r\n'orderby' =&gt; 'name',\r\n'show_count' =&gt; true,\r\n'feed_image' =&gt; '\/path\/to\/feed_image.png',\r\n'echo' =&gt; false,\r\n) );\r\n$html .= '&lt;\/ul&gt;';\r\nreturn $html;\r\n}\r\nadd_shortcode('category-feed', 'display_category_feed' );<\/pre>\n<p>[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]You will, of course, need to replace<em> \/path\/to\/feed_image.png<\/em> with the URL of an image in your media library which you wish to use as a feed icon. We will use a white arrow icon, but the choice is, of course, yours.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]When done, click the <strong>Update File<\/strong> button.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"518\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Add-Code.jpg\" class=\"attachment-full size-full\" alt=\"Add Code\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Add-Code.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Add-Code-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Add-Code-768x411.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Add-Code-620x331.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]This code creates a <a href=\"https:\/\/qodeinteractive.com\/magazine\/create-shortcode-in-wordpress\/\">custom shortcode<\/a> which you can use anywhere on your website to display a list of category RSS feeds. As an example, we will show you how to display as a shortcode block on the homepage of our website, but you are not limited in your usage of shortcodes or page editor.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]After navigating to <strong>Appearance\/Widgets<\/strong>, locate the widget area where you wish to display your category feeds. Note that the number and names of your widget areas vary from theme to theme. Click the <strong>plus<\/strong> sign and select a <strong>Shortcode<\/strong> block.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"498\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Widgets-Add-Block.jpg\" class=\"attachment-full size-full\" alt=\"Widgets Add Block\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Widgets-Add-Block.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Widgets-Add-Block-300x154.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Widgets-Add-Block-768x395.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Widgets-Add-Block-620x319.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Paste this shortcode into the block\u2019s field:<em> [category-feed]<\/em>. Click the <strong>Update<\/strong> button.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"495\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Shortcode.jpg\" class=\"attachment-full size-full\" alt=\"Shortcode\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Shortcode.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Shortcode-300x153.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Shortcode-768x392.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Shortcode-620x317.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]And there you have it, our category RSS feeds are in our test website\u2018s footer.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"524\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Footer-Feed.jpg\" class=\"attachment-full size-full\" alt=\"Footer Feed\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Footer-Feed.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Footer-Feed-300x162.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Footer-Feed-768x415.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2022\/02\/Footer-Feed-620x335.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]This way, our category feeds will be updated if a new category is added or if an old one is deleted or its name changed.[\/vc_column_text][vc_empty_space height=&#8221;68px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\">In Conclusion<\/h2>\n<p>[\/vc_column_text][vc_column_text]As we have shown, RSS feed users can rely on WordPress to provide them with the RSS feed they wish, be that the feed for the entire website or one of its categories, but only provided they know the slug for each category they are interested in. Sure, they can find out what it is with a little research, but we\u2018d venture to say that a vast majority of website users (and that goes for any website) would take a straightforward link to what they need in favour of a digital scavenger hunt, fun though it may be. In this article, we have shown you how to locate and display a custom, category-based RSS feed on your website and provide your visitors with a simpler, more intuitive experience.<br \/>\n[\/vc_column_text][\/vc_column][\/vc_row]<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Cater to your RSS feed users by setting up RSS feeds for every category on your website &#8211; we will show you how.<\/p>\n","protected":false},"author":16990,"featured_media":34532,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[211,74,13],"class_list":["post-34431","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-categories","tag-rss","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/posts\/34431","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/users\/16990"}],"replies":[{"embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/comments?post=34431"}],"version-history":[{"count":0,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/posts\/34431\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/media\/34532"}],"wp:attachment":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/media?parent=34431"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/categories?post=34431"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/tags?post=34431"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}