The default RSS URL for WordPress is http://my-site.com/feed/. Theme makers and developers use the default RSS URL every where on a theme.
This default URL is retrieved by using the WordPress template tag bloginfo(‘rss_url’).
But, what if you use FeedBurner or a similar service? How do you tell WordPress, its themes, and its plugins to show your own custom RSS link instead of the default?
Here’s how. Paste the following code into the functions.php file of your theme:
function my_rss_link($output, $show)
{
if (in_array($show, array(‘rss_url’, ‘rss2_url’, ‘rss’, ‘rss2’, ”)))
$output = ‘http://feeds.feedburner.com/mypress‘;return $output;
}
add_filter(‘bloginfo_url’, ‘my_rss_link’, 10, 2);
add_filter(‘feed_link’, ‘my_rss_link’, 10, 2);
That’s it.
Now whenever bloginfo(‘rss_url’) or bloginfo(‘rss2_url’) is called, it’ll show your custom RSS feed link. Don’t forget to replace my RSS URL with your own above.
Leave a Reply