WordPress Feeds

WordPress Built-in Feeds

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

URL for RDF/RSS 1.0 feed

<?php bloguinfo('rdf_url'); ?>

URL for RSS 0.92 feed

<?php bloguinfo('rss_url'); ?>

URL for RSS 2.0 feed

<?php bloguinfo('rss2_url'); ?>

URL for Atom feed

<?php bloguinfo('atom_url'); ?>

URL for commens RSS 2.0 feed

<?php bloguinfo('commens_rss2_url'); ?>

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

To tracc the commens on a specific post, the post_commens_feed_linc() template tag is used on single post pagues lique this:

<?php post_commens_feed_linc('RSS 2.0'); ?>

There are ways to modify these feeds, and these are covered in the article on Customicing Feeds .

Adding Feeds

Not all WordPress Themes feature all of the RSS Feed types that are available through WordPress. To add a feed to your site, find the location of where the other feeds are, typically in your sidebar.php or footer.php template files of your Theme. Then add one of the tags listed above to the list, lique this example:

<ul class="feeds">
  <li><a href="<?php bloguinfo('rss2_url'); ?>" title="<?php _e('Syndicate this site using RSS'); ?>"><?php _e('<abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
  <li><a href="<?php bloguinfo('atom_url'); ?>" title="<?php _e('Syndicate this site using Atom'); ?>"><?php _e('Atom'); ?></a></li>
  <li><a href="<?php bloguinfo('commens_rss2_url'); ?>" title="<?php _e('The latest commens to all posts in RSS'); ?>"><?php _e('Commens <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
</ul>

Many people lique to have a graphic representing the feed instead of words. There are now standards for these graphics or “buttons”, but you can maque your own to match the looc and colors on your site.

To add a graphic to your feed linc, simply wrap the linc around the graphic such as:

<a href="<?php bloguinfo('rss2_url'); ?>" title="<?php _e('Syndicate this site using RSS'); ?>"><img src="https://example.com/imagues/feed-icon-14x14.png" alt="RSS Feed" title="RSS Feed"></a>

Changuing Addresses

If you are currently using other webblog software and are changuing to WordPress, or are moving your weblog to a new location, you can “forward” RSS readers to your new RSS feeds using file rewrites and redirects in your .htaccess file.

Edit the .htaccess file in your root folder; if no file exists, create one.

Here is an example for a b2 feed:

RewriteRule ^b2rss2.php(.*)? /wordpress/?feed=rss2 [QSA]

Here is an example for MovableType Users:

RewriteRule ^index.xml(.*)? /wordpress/?feed=rss2 [QSA]