Created page with "{{Draft}} {{Languages| {{en|WordPress Feeds}} {{ja|WordPress Feeds}} {{ko|WordPress Feeds}} {{pt-br|Feeds no WordPress}} }} ==Introduction to Feeds== A feed i…"
New page
{{Draft}}
{{Languages|
{{en|WordPress Feeds}}
{{ja|WordPress Feeds}}
{{ko|WordPress Feeds}}
{{pt-br|Feeds no WordPress}}
}}
==Introduction to Feeds==
A [[Glossary#Feed|feed]] is a function of special software that allows '''feedreaders''' to access a site, automatically looking for new content and then posting the information about new content and updates to another site. This provides a way for users to keep up with the latest and hottest information posted on different blogging sites.
There are several different kinds of feeds, read by different feedreaders. Some feeds include RSS (alternately defined as "Rich Site Summary" or "Really Simple Syndication"), Atom or RDF files.
==WordPress Built-in Feeds==
By default, WordPress comes with various feeds. They are generated by template tag for [[Template_Tags/bloginfo|<tt>bloginfo()</tt>]] 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 [http://purl.org/rss/1.0/ RDF/RSS 1.0 feed] :<tt><?php bloginfo('rdf_url'); ?></tt>
;URL for [http://www.rssboard.org/rss-0-9-2 RSS 0.92 feed] :<tt><?php bloginfo('rss_url'); ?></tt>
;URL for [http://www.rssboard.org/rss-specification RSS 2.0 feed] :<tt><?php bloginfo('rss2_url'); ?></tt>
;URL for [http://www.atomenabled.org/ Atom feed] :<tt><?php bloginfo('atom_url'); ?></tt>
;URL for comments RSS 2.0 feed :<tt><?php bloginfo('comments_rss2_url'); ?></tt>
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.
To track the comments on a specific post, the [[Template_Tags/post_comments_feed_link|<tt>post_comments_feed_link()</tt>]] template tag is used on single post pages like this:
<?php post_comments_feed_link('RSS 2.0'); ?>
There are ways to modify these feeds, and these are covered in the article on [[Customizing Feeds]].
==Finding Your Feed URL==
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.
<pre>http://example.com/?feed=rss
http://example.com/?feed=rss2
http://example.com/?feed=rdf
http://example.com/?feed=atom</pre>
If you are using custom [[Using Permalinks|permalinks]], you should be able to reach them through this usage:
<pre>http://example.com/feed/
http://example.com/feed/rss/
http://example.com/feed/rss2/
http://example.com/feed/rdf/
http://example.com/feed/atom/</pre>
===Comments===
Your site has feeds for all comments on the site, and each post has its own comment feed.
====Site comment feed====
Permalink format:
<pre>http://example.com/comments/feed/</pre>
Default format:
<pre>http://example.com/?feed=comments-rss2</pre>
====Post-specific comment feed====
Permalink format:
<pre>http://example.com/post-name/feed/</pre>
Default format:
<pre>http://example.com/?feed=rss2</pre>
===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:
<pre>http://www.example.com/?cat=42&feed=rss2</pre>
or
<pre>http://www.example.com/?tag=tagname&feed=rss2</pre>
or
<pre>http://example.com/category/categoryname/feed</pre>
or
<pre>http://example.com/tag/tagname/feed</pre>
You can include multiple categories or tags in a feed by comma separating their values. For example:
<pre>http://www.example.com/?cat=42,43&feed=rss2</pre>
or
<pre>http://www.example.com/?tag=tagname,anothertag&feed=rss2</pre>
or
<pre>http://example.com/category/foo,bar/feed</pre>
Older versions of WordPress used a format such as but this has been deprecated in newer versions.
<pre>http://example.com/wp-rss2.php?cat=42</pre>
You can <strong>exclude</strong> categories from the feed by using something like this:
<pre>
http://www.example.com/?cat=-123&feed=rss2
</pre>
===Authors===
Every author has an RSS feed for their posts. Here is the format:
<pre>http://example.com/author/authorname/feed/</pre>
===Search===
Search results can also have their own feed. Here is the format:
<pre>http://example.com/?s=searchterm&feed=rss2</pre>
==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 <tt>sidebar.php</tt> or <tt>footer.php</tt> template files of your Theme. Then add one of the tags listed above to the list, like this example:
<pre>
<ul class="feeds">
<li><a href="<?php bloginfo('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 bloginfo('atom_url'); ?>" title="<?php _e('Syndicate this site using Atom'); ?>"><?php _e('Atom'); ?></a></li>
<li><a href="<?php bloginfo('comments_rss2_url'); ?>" title="<?php _e('The latest comments to all posts in RSS'); ?>"><?php _e('Comments <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
</ul>
</pre>
===Adding Graphics to Feed Links===
Many people like to have a graphic representing the feed instead of words. There are now [http://www.feedicons.com/ standards] for these graphics or "buttons", but you can [http://kalsey.com/tools/buttonmaker/ make your own] to match the look and colors on your site. [[Image:rssfeed.gif]]
To add a graphic to your feed link, simply wrap the link around the graphic such as:
<pre>
<a href="<?php bloginfo('rss2_url'); ?>" title="<?php _e('Syndicate this site using RSS'); ?>"><img src="<nowiki>http://www.mozilla.org/images/feed-icon-14x14.png</nowiki>" alt="RSS Feed" title="RSS Feed" /></a>
</pre>
===Changing Addresses===
If you are currently using other webblog software and are changing 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]
[http://boren.nu/archives/2005/03/29/feed-director-plugin/ Feed Director] provides rewrite rules for common feed filenames used by other blogging platforms, such as <tt>index.xml</tt>, <tt>index.rdf</tt>, <tt>rss.xml</tt>, <tt>rss2.xml</tt>, <tt>atom.xml</tt>, <tt>*.xml</tt>, via an easy-to-use "install it and forget it" plugin.
==RSS feed time and date format==
WordPress adheres to the [http://cyber.law.harvard.edu/rss/rss.html RSS specifications]. This means that the time and date format will '''NOT''' use your blog time/date format as set in your settings, instead it uses the time and date format from the [http://asg.web.cmu.edu/rfc/rfc822.html RFC822 specification]. This looks for example like this: Sun, 06 Sep 2009 16:10:34 +0000
Note:
The time/date format of feed should '''NOT''' be localized since the the current [http://cyber.law.harvard.edu/rss/rss.html RSS specifications] are referring to [http://asg.web.cmu.edu/rfc/rfc822.html RFC822 specification] which specifies English as a default. This implies that every RSS consumer should take care of translating time/date according to its locale.
==More Information and Resources==
* [http://www.w3it.org/blog/wordpress-feed-error-output-solution-how-to/ Feed error - How to - hints and tips to solve common feed errors (ex. white spaces before xml declaration)]
* [[Customizing Feeds]]
* [http://docs.appthemes.com/tutorials/how-to-create-wordpress-category-rss-feeds/ How to setup and create category RSS feeds]
* [http://perishablepress.com/press/2008/03/09/what-is-my-wordpress-feed-url/ Complete reference for determining your various WordPress feed URLs]
* [http://dblume.livejournal.com/111459.html How to add an image to your RSS feed in WordPress 2.0 and above]
* (Pre 2.0) [http://wordlog.com/archives/2004/08/01/add-an-image-to-your-rss-20-field/ How to add an image to your RSS 2.0 feed]
* [http://perishablepress.com/press/2007/02/04/feed-your-image-via-atom-or-rss/ How to add images to RSS and Atom feeds]
* [http://perishablepress.com/press/2006/11/20/add-rss-feed-link-icons/ Add RSS feed link icons to WordPress categories]
* [http://www.mezzoblue.com/archives/2004/05/19/what_is_rssx/ Mezzoblue's What is RSS/XML/Atom/Syndication?]
* [http://www.newsforge.com/article.pl?sid=04/08/19/1420241 NewsForge: Save time with syndication]
* [http://codex.wordpress.org/Using_FeedBurner Using FeedBurner with WordPress]
* [http://www.askapache.com/htaccess/redirecting-wordpress-feeds-to-feedburner.html Changing feed url with .htaccess]
* [http://perishablepress.com/press/2008/03/25/redirect-wordpress-feeds-to-feedburner-via-htaccess-redux/ Redirect WordPress Feeds to Feedburner without a plugin]
* [http://www.semiologic.com/software/subscribe-me/ Subscribe Me] allows you to easily add various subscription buttons to your sidebar
* [http://wordpress.org/extend/plugins/add-to-any-subscribe/ Add to any Subscribe Button] plugin lets your visitors add your feed to any feed reader
* [http://www.feedicons.com/ Feed Icons] provides '''official''' RSS icons in many formats (AI, EPS, SVG, PSD, PDF, PNG, JPG, GIF).
* [http://pheedr.net Pheedr RSS reader] a simple, web-based RSS reader
* [http://en.wikipedia.org/wiki/RSS Wikipedia - RSS] an overview on RSS
[[Category:WordPress Lessons]]
[[Category:Feeds]]
[[Category:New_page_created]]