WordPress 3.0 Theme Tip: Feed Links
For ages, theme authors have been adding code like this to their theme’s header.php files:
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
No need for that any more. Remove that stuff, make sure you’ve got the wp_head() call in the header (like you should anyway), then add this to the theme’s functions.php file instead:
add_theme_support( 'automatic-feed-links' );
This automatically adds the relevant feed links everywhere on the whole site. Standard feed, comments links, category and tag archives, everything as it should be.
Shortlink:

thx, great tip, been struggling with a lot of plugins to achieve this
Automatic feed links have been around since WP 2.8.
Only the `add_theme_support( ‘automatic-feed-links’ );` bit is new.
True, but almost nobody knew about it in 2.8. This makes it more obvious and somewhat simpler to use.
[...] WordPress 3.0 Theme Tip: Feed Links [...]
woowww.. simple tags thanks for share
I needed to know about this,
thanks for posting AND making it findable in one page search!
[...] the <head> section of their pages. Now, WordPress 3.0 does it automatically for us. Check out Otto’s post for more [...]
[...] the <head> section of their pages. Now, WordPress 3.0 does it automatically for us. Check out Otto’s post for more [...]
[...] it opens up a wide variety of possibilities for customizing the background of your WordPress Theme.WordPress 3.0 Theme Tip: Feed Links – Otto on WordPress – Otto brings up another tip for WordPress Theme authors on how to add automatic feed links [...]
[...] Otto on WordPress – add theme support automatic feed links [...]
[...] WordPress 3.0 Theme Tip: Feed Links [...]
[...] WordPress 3.0 Theme Tip: Feed Links [...]
I have added the code to functions.php and the header is correct, but the feeds do not work. Anything else I might try? This is a wp ecommerce site. Thanks for the tips.