Redirect your WordPress feed to Feedburner

Want to redirect your WordPress default RSS feed to for example Feedburner? Add this in your theme’s functions.php and change to your custom feed link.

/*  Custom rss feed
/* ------------------------------------ */
function alx_custom_rss_feed( $output, $feed ) {
	// Do not redirect comments feed
	if ( strpos( $output, 'comments' ) )
		return $output;
	return esc_url('');
add_filter( 'feed_link', 'alx_custom_rss_feed' , 10, 2 );

The comments feed will remain the same.

Written by:Alexander Agnarson

Leave a Reply

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