first_page the funky knowledge base
personal notes from way, _way_ back and maybe today

PHP: “WordPress Feeds”; codex.wordpress.org

By default, WordPress comes with various feeds. They are generated by template tag for bloginfo() for each type of feed and are typically listed in the sidebar and/or footer of most WordPress Themes. They look like this:

URL for RDF/RSS 1.0 feed <?php bloginfo('rdf_url'); ?>

URL for RSS 0.92 feed <?php bloginfo('rss_url'); ?>

URL for RSS 2.0 feed <?php bloginfo('rss2_url'); ?>

URL for Atom feed <?php bloginfo('atom_url'); ?>

URL for comments RSS 2.0 feed <?php bloginfo('comments_rss2_url'); ?>

The first four feeds display recent updates and changes to your site's content for the different feedreaders. Of these, the RSS feeds are the most well known. The last feed example is used by RSS 2.0 feedreaders and does not show your site's content. It only shows the comments made on your site.

There are times when you want to tell someone your site's feed address or URL, or you need it to submit it to search engines and directories, many of which now accept feed URL submissions. There are four possible URLs for each of your feeds. Any of these will work.

http://example.com/wp-rss.php http://example.com/wp-rss2.php http://example.com/wp-rdf.php http://example.com/wp-atom.php

Or you can access them like this:

http://example.com/?feed=rss http://example.com/?feed=rss2 http://example.com/?feed=rdf http://example.com/?feed=atom

If you are using custom permalinks, you should be able to reach them through this usage:

http://example.com/feed/ http://example.com/feed/rss/ http://example.com/feed/rss2/ http://example.com/feed/rdf/ http://example.com/feed/atom/

Categories and Tags

You can also provide feeds to only specific categories or tags on your site by adding the following to the end of the link:

http://www.example.com/?cat=42&feed=rss2 or http://www.example.com/?tag=tagname&feed=rss2 or http://example.com/category/categoryname/feed

Older versions of Wordpress used a format such as

http://example.com/wp-rss2.php?cat=42

but this has been deprecated in newer versions.

[http://codex.wordpress.org/WordPress_Feeds]

mod date: 2009-08-19T02:41:02.000Z