Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Automatic Feed Links


Automatic Feed Links is a theme feature introduced with Version 3.0. This feature adds RSS feed links to HTML <head>.

Note: Pre 3.0 sites should use the deprecated automatic_feed_links() function.

Adding Theme Support

Since Version 3.0, themes need to use add_theme_support() in the functions.php file to support feed links, like so:

add_theme_support( 'automatic-feed-links' );

Backwards Compatibility

To add backwards compatibility for older versions, use the following code:

global $wp_version;
if ( version_compare( $wp_version, '3.0', '>=' ) ) :
	add_theme_support( 'automatic-feed-links' ); 
else :
	automatic_feed_links();
endif;

Resources

Related

Theme Support: add_theme_support(), remove_theme_support(), current_theme_supports()
Theme Features: sidebar, menus, post-formats, title-tag, custom-background, custom-header, custom-logo, post-thumbnails, automatic-feed-links, html5, editor-style, content_width