For future reference, this article covers each of the many ways to access your WordPress-generated feeds. Several different URL formats are available for the various types of WordPress feeds — posts, comments, and categories — for both permalink and default URL structures. For each example, replace “http://domain.tld/” with the URL of your blog. Note: even though your blog’s main feed is accessible through many different URLs, there are clear benefits to using a single, consistent feed URL throughout your site.
WordPress Post-Feed Formats for Permalinks
If you have permalinks enabled on your site, your main-content (posts) feed is accessible via the following URLs, depending on which feed format you would like to use:
http://domain.tld/feed/(RSS 2.0 format)http://domain.tld/feed/rss2/(RSS 2.0 format)http://domain.tld/feed/rss/(RSS 0.92 format)http://domain.tld/feed/rdf/(RDF/RSS 1.0 format)http://domain.tld/feed/atom/(Atom format)
WordPress Post-Feed Formats for Default URLs (non-permalink)
By default, your main-content (posts) feed is accessible via the following URLs, depending on desired format:
http://domain.tld/wp-rss2.php(RSS 2.0 format)http://domain.tld/wp-rss.php(RSS 0.92 format)http://domain.tld/wp-rdf.php(RDF/RSS 1.0 format)http://domain.tld/wp-atom.php(Atom format)
WordPress Post-Feed Formats via Query String (non-permalink)
Alternately, your main-content (posts) feed is also available at the following URLs, depending on desired format:
http://domain.tld/?feed=rss2(RSS 2.0 format)http://domain.tld/?feed=rss(RSS 0.92 format)http://domain.tld/?feed=rdf(RDF/RSS 1.0 format)http://domain.tld/?feed=atom(Atom format)
Display your Default Post-Feed URLs
To determine/display the default posts feed URL for your blog’s main content, place any or all of these template tags into a useful location in one of your theme files:
<?php bloginfo('rss2_url'); ?>(RSS 2.0 format)<?php bloginfo('rss_url'); ?>(RSS 0.92 format)<?php bloginfo('rdf_url'); ?>(RDF/RSS 1.0 format)<?php bloginfo('atom_url'); ?>(Atom format)
WordPress Main Comments Feed
Your blog’s main comments feed is available only in RSS 2.0 format, but there are several URL options from which to choose:
http://domain.tld/comments/feed/(Permalink format)http://domain.tld/wp-commentsrss2.php(Default format)http://domain.tld/?feed=commentsrss2(Query-string format)
Display your Main-Comments Feed URL
To display the default URL for your main comments feed, add this template tag to your theme file and load the page in your browser:
<?php bloginfo('comments_rss2_url'); ?>
Post-Specific Comment Feeds
By default, every post also delivers its own feed featuring all of its comments. To display feed URLs for individual, post-specific comment feeds, place this template tag anywhere in the main post loop or comment loop 1:
<?php comments_rss_link('Subscribe to comments on this post via RSS-2.0 feed'); ?>
Alternately, to display the comment feed URL for any specific post, simply append either of the following to the original post URL:
feed/(Permalink format)?feed=rss2(Default format)
Here is an example of each method for a generalized post URL:
http://domain.tld/individual-post/feed/(Permalink format)http://domain.tld/individual-post/?feed=rss2(Default format)
Update: When using default (non-permalink) URLs, the post-specific comment feeds are available via the following format:
http://domain.tld/?feed=rss2&p=123
..where "p=" references the post ID (thanks to Spamboy for sharing this information).
Category Feeds
To display individual category feed URLs, use either of the following formats 2:
http://domain.tld/category/categoryname/feed/(Permalink format)http://domain.tld/wp-rss2.php?cat=33(Default format)
References
55 Responses
Jeromy – October 28, 2008
wow, great overview! What about comments feed per author? Is there a way to show a feed of comments on all posts written by a specific author? Like twitter?
Jeff Starr – October 29, 2008
@Jeromy: yes, I am sure it is possible.. the WordPress Codex mentions them in the context of the
wp_list_authorstag. I would imagine that the format is something similar to this:http://your-domain.com/author/author-name/feed/Jeromy – October 29, 2008
yeah, no go. That feed structure shows all posts by an author, not all comments for an author or their posts. I would expect something like: http://www.site-name.com/author/jeromy/comments/feed – but that just bring up an empty feed page. I’m convinced this isn’t possible…maybe a custom query?? I’m not very good at those
Jeff Starr – October 29, 2008
Ah, I missed that.. I didn’t read carefully enough that you were going for the comments feed of a particular author. That would definitely require some custom wrangling, but would certainly make for a great plugin. Actually, I wouldn’t be surprised if something similar didn’t already exist!
Jeromy – October 29, 2008
yeah, I’ve looked high and low for that. I pride myself on finding plugins and this one does not exist (well, searching wordpress.org/extend/plugins is nearly futile as all you never really get are the popular plugins as results). Guess I’ll keep looking
Jeff Starr – October 29, 2008
I’ll keep my eyes open too and report back here if anything pops up. Good luck!
Mr. Drive – December 8, 2008
Hi,
I have a blog at http://www.cayucorace.org, and I am displaying future posts in the website as events in the events category.
I would like to organize the information displayed in the main RSS FEED so that posts are displayed by category (such as in the index page of this blog), by displaying the latest 5 posts of the categories I choose. Everything should work fine for all the categories, except for the Events category since the last 5 posts will be three months into the future.
In other words, I would like the feed to display the upcoming next 5 events/posts form “today”, only for the EVENTS category, and to display the last 5 posts for the other categories.
Is this feasible with the current wordpress implementation?
Are there any plugins that allow me to do this?
In several occasions, your blog has helped me a lot in doing intrepid things with wordpress, i.e. in using wordpress for what it is not supposed to be used =). Thanks a lot!
BTW, your blog style looks awesome!
Jeff Starr – December 8, 2008
@Mr. Drive: Hmmm.. that’s a new one to me. I haven’t heard of any plugin that works on feeds in the manner you describe. There is a plugin called AStickyPostOrderER that handles such functionality for index views — perhaps it could be tweaked to affect feeds as well?
Michelle – December 9, 2008
Thanks so much – this has been so helpful!
gaurav nanda – January 30, 2009
Hi,
This article has been very helpful,thanks for sharing such important info in such simple form
Hansen – March 3, 2009
Just wanted to add that you can use:
?feed=rss2&s=searchqueryto search with your feed :)
Now I’m looking for a complete list of what variables you can use in default format. So far I know of cat, p and s but there should be more.
Thanks
Hansen – March 4, 2009
Found another one so you can get all posts for specific years, months or days:
?feed=rss2&m=2009?feed=rss2&m=200903?feed=rss2&m=2009034Now I just need a way to offset the posts in a rss query (so I can get posts 11-20 for example). Any takers?