Redirect Your WordPress RSS Feed to FeedBurner Without a Plugin

I am not a fan of running a large amount of plugins on my WordPress sites.  Even though there has been a lot of debate as to whether or not it actually effects the performance of your site, I would rather limit the number by as many as possible.  For those of you that have looked for a quick and easy way to redirect your feeds to FeedBurner, you may have downloaded and installed a few different plugins.  Well, you don’t need a plugin, just edit your functions.php file and redirect away.

To redirect your feed without a plugin, add the following to your theme’s functions.php file and replace the URL with your own FeedBurner URL

[php] // ————————————————————————–
// Start Redirect Feed to FeedBurner
// ————————————————————————–
function custom_rss_feed( $output, $feed ) {
if ( strpos( $output, ‘comments’ ) )
return $output;

return esc_url( ‘http://feeds.feedburner.com/yourfeedburnerurl’ );
}
add_action( ‘feed_link’, ‘custom_rss_feed’, 10, 2 );
// ————————————————————————–
// End Redirect Feed to FeedBurner
// ————————————————————————–
[/php]

About Joe D

I have always had a passion for everything computing. In early 2000, I decided to take my passion to the web. Thus, C.O.D. was born. Through the years we have made many great friends at C.O.D. and hope to continue our journey for years to come.

Check Also

Change the WordPress Editor Font

I work with WordPress a lot.  By nature, I like to fiddle with things too.  …

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.