Hi,
I want to replace my default feed url /feed into custom URL of my feedburner, how can i do that?
1 Answers
Hi,
For those who prefer a function instead of a plugin, you can use the following code. It uses the feed_link action hook and replaces all instances of your default WordPress feed (rss, rss2, atom, and rdf). Rename the function and remember to replace the url with your Feedburner url.
// replace the default posts feed with feedburner function appthemes_custom_rss_feed( $output, $feed ) { if ( strpos( $output, 'comments' ) ) return $output; return esc_url( 'http://feeds.feedburner.com/AppThemes/' ); } add_action( 'feed_link', 'appthemes_custom_rss_feed', 10, 2 );
Hope this helps !
Hi Dominic,
Where should i put the code?
You can put this code in the functions.php file (\wp-content\themes\dw-focus)
Please login or Register to submit your answer