Creating Wordpress RSS Feeds for all Categories
Posted on 23. Aug, 2008 by Holly in Blogging, Tutorials, Wordpress
Tutorial: Creating Wordpress RSS Feeds for Multiple Categories
I’ve noticed a handful of useful Wordpress websites which allow users to subscribe to specific RSS Feeds for particular categories. Prior to seeing this, I did not know that the Wordpress installation had any more than the one basic feed URL. The normal feed URL with wordpress is: http://website.com/feed/. I wanted to make it easier for the readers to subscribe to very specific topics – rather than get notified of everything that is updated. So, after searching for a wordpress plugin, and having no luck with any of the possible choices – I just created it by myself. If you are having problems with the same issues, this quick guide might help you.
Location
- FIrst, figure out where on your website that you would like the “Subscribe to Topics” links to occur. The sidebar (either on the left-hand or right-hand side of your website is a typical location, although the links could be placed elsewhere).
- In this example, I will be putting the “Subscribe to Topics” links in the sidebar. Figure out exactly where you want it to show up. If you are totally unfamiliar with web design or editing files, this will be a learning experience for you.
Format for Category RSS Feeds with Wordpress
- The actual format of your feed URLs will vary. Most people use Permalinks (to create SEO-friendly URLs) and if that is the case, your feed URLs will be in this format: http://website.com/feed
- If you want to create feeds for multiple categories, so people can subscribe to only what is of interest to them, you can do that as well. Format for feeds of specific categories is: http://website.com/categoryname/feed. For subcategory feeds, the RSS Format is: http://website.com/categoryname/subcategoryname/feed. It’s pretty simple, and there are a few different possible URLS structures for the feeds, but you get the basic idea.
- Personally, I prefer to use the format just mentioned. But, for those who know what they are doing, and would like to have the feed in an alternate format, these are possible options:
- http://website.com/feed/
- http://website.com/feed/rss/
- http://website.com/feed/rss2/
- http://website.com/feed/rdf/
- http://website.com/feed/atom/
For more details about all possible uses and formats, please refer to the Wordpress information here.
Create Your Feeds List
- Now you must figure out which feeds you want to offer custom RSS Feeds for. Open up notepad and type out all the URLs and names of the feeds you would like to create. To find the correct URL, you will need to know the URLs to your category pages. Most websites with widgets allow you to create a widget that has a list of your categories. If you can do that, it will make it quite easy for you to get the URLs. Just scroll over the link to that category, copy the URL link and paste it into your notepad file.
- The reason we are doing this manually instead of using a piece of PHP code to pull the category feeds in is because I want to be able to hand-choose the feeds I want to create (I also don’t know enough about PHP and don’t have the time to figure it out).
- Here are some of the category feed URLs that I want to create for my example:
- Subscribe to All Topics http://honestholly.com/feed
- Subscribe to All Comments http://honestholly.com/comments/feed
- Making Money http://honestholly.com/topics/make-money-online-honestly/feed
- Blogging http://honestholly.com/topics/blogging-101/feed
- The place in the URL above that shows “topics” might need to be replaced with the word “categories,” but that depends on your permalink structure and how your URLs are setup.
Putting it Together with HTML
- In order to create a nice looking graphic RSS Image with the hyperlinks to each specific feed, you will need to put it in the proper HTML format. The format for the four links above, can be seen here. You can use this very format for your links.
- You don’t need to know what all the code means, but you need to be able to insert in your URLs in place of those – and the topic names in place of the ones there as well.
<div id=”sidebarfeeds”>
<ul>
<li><a href=”http://honestholly.com/feed”>Subscribe to All Topics</a></li>
<li><a href=”http://honestholly.com/comments/feed”>Subscribe to Comments</a></li>
<li><a href=”http://honestholly.com/topics/blogging-101/feed”>Blogging</a></li>
<li><a href=”http://honestholly.com/topics/make-money-online-honestly/feed”>Business Preparations</a></li>
</ul>
</div>
Create Your Widget Now
- Now that you have the code that you need, it is time to create the widget. Login to your Wordpress
admin area, scroll over the DESIGN tab and click on WIDGETS. On the left-hand side, find a widget that says “TEXT” (next to it, you should see “arbitrary text or html.” Click to Add it to your sidebar. Then place it anywhere that you want these links to show up at. - Find the new sidebar widget on the right-hand side, and click edit. A box will open up and allow you to insert code or text. You will want to insert the HTML code that you just created.
- As you can see, the code starts with the <div id=”sidebarfeeds”> and ends with a </div>
- The reason I used that special piece of code is because i wanted the list of links to appear in a really
nice and professional format. In order to do that, I needed to create a special piece of code to put into my stylesheet (style.css). For those who have no idea what I am talking about, my intention is not to overwhelm you! Basically, a stylesheet is a type of file that contains all of the details for specific design elements on your website; placement of objects, spacing and images, etc. I created a special style for this to look nice. (you can get the code for that below the screenshot here)
Final Step – Adding the Style to the Stylesheet
- So, the final step here is to add the special style to the stylesheet.
- Here is the code I used:
#sidebarfeeds { width:280px;
float:right;
margin-bottom:10px;
padding:0px 5px 0px 5px;
background:#fff;
}
#sidebarfeeds li {
list-style:none;
border-bottom:1px dotted #ccc;
display:block;
padding:2px 0px 2px 25px;
background:url(/wp-content/uploads/icons/021.png) no-repeat 0 0px; }
- That information was added to my style.css file. That file was located at: http://website.com/wp-content/themename/style.css
- You can add it to the end of your file or anywhere in between – just be sure to keep it in tact as it is here. Don’t forget any of the code.
- You will most likely need to alter the code slightly -because your sidebar might be smaller than mine is. The sidebar itself for my website is 300 pixels wide. So, the normal size for this is 20 pixels less – which is why you see in the style code it is 280px wide. It also has some padding around it.
- The second part of the code is for the list of links that will appear with the graphic RSS Feed image next to them. So, you will need to have an actual RSS feed image if you want one to appear. You will need to use an FTP program or file manager to upload an actual RSS image that you want to use. As you can see above, my file location for the uploaded graphic was at: /wp-content/uploads/icons/021.png. You can upload your image wherever you like, just be sure to put the correct URL path to it in the stylesheet code above (replace mine). If you don’t know the correct format, you can alternatively put the direct path to it, for example: http://website.com/wp-content/uploads/icons/name.png.
- Once your stylesheet has the new style inserted, just save it. Save your new widget and place it anywhere you want the feed to appear. That’s it!
If you have any trouble with the style of the new widget (the size or padding, etc.) my only suggestion is that you copy some of the code from your other widgets. Keep it the same width, same padding and margins as the widgets above and below it and you should be fine!
That’s it! I hope this helped you!



annaverawilliams
23. Aug, 2008
Thanks Holly, I had been wondering about this too.
When I am ready to do this I will come back here for reference!
My next overhaul on my blog is going to be changing the domain name, and trying to set it up so all the old permalinks redirect to the new. I bought a domain name which I like much better! I can tell you later in an email. (Right now, still packing and scanning my old papers …
)
TheDavinator
23. Aug, 2008
Very, very useful Holly. I was meaning to ask you about that when I’d noticed you had done that. Now I know…step by step. Thanx Holly
Davinchi
Holly
23. Aug, 2008
GOOD!!! I am very happy if it helps.
If you need help with anything related to wordpress or web design, etc. let me know. I am not an expert but I am resourceful!
The “smart” internet marketers outsource this kind of thing, but I really enjoy learning and sharing. So, if any help is needed, in accomplishing anything with wordpress just let me know!
JK Swopes
23. Aug, 2008
Thanks! I had used category feeds for some other situations, but never made a link section for them! Very detailed and laid out nicely…I’m sure many will find this useful.
Categories are always a thing I am messing around with! Sometimes I like to show them all and sometimes I don’t…it really depends on how I am feeling.
JK Swopess last blog post..24 Hour Site Flipping Contest. Crackhead Style.
CWReid
23. Aug, 2008
Great Information Holly. I have another question. Where is your affiliate link? I want to tell some folks about your program but I can’t find any affiliate information. Am I looking in the wrong place? Is there an affiliate program in place to utilize?
MarianSparks
30. Dec, 2008
Holly –
This is fabulous! I just spent the last hour searching for this exact information. I’m so glad that I found your post! I was trying to figure out a way to create a feed for a Topic on “Quotes”. I knew how to figure out the feed URL. But I missed the step on setting this up in the sidebar. Since I’m still new to some of this coding, I appreciate you saving me a ton of time! I’ll be following your step-by-step instructions in the next 2 weeks when I migrate to my new template. Thanks again!
Marian
SEO, RSS and The Power of Syndication | SEO Design Solutions
04. Jun, 2009
[...] resourceful post is located here Creating WordPress RSS Feeds using Categories for those of you who can’t wait to pop the hood of this powerful CMS and implement the power [...]
SEO, RSS and The Power of Syndication
09. Jun, 2009
[...] resourceful post is located here Creating WordPress RSS Feeds using Categories for those of you who can’t wait to pop the hood of this powerful CMS and implement the power [...]