开发者

Is there a Feedburner plugin for Wordpress that will change the RSS <link /> tags on the pages

开发者 https://www.devze.com 2023-04-07 11:25 出处:网络
I\'m looking for a Feedburner plugin for Wordpress that redirects feeds to Feedburner, but also changes the RSS links that are embedded on the Wordpress pages to point to Feedburner.The plugins I\'ve

I'm looking for a Feedburner plugin for Wordpress that redirects feeds to Feedburner, but also changes the RSS links that are embedded on the Wordpress pages to point to Feedburner. The plugins I've tried will redirect the RSS feed, but none of them change the embedded开发者_StackOverflow中文版 RSS tags. So in Safari, for instance, when you click the RSS button, it pulls from the Wordpress feed (instead of Feedburner).


As I recall Wordpress does not offer an api that allows you to modify the RSS links. However, you can remove them completely and then add back in your own. This WP support post is where I got the following info.

Add the following to your functions.php in your theme directory

//remove the feeds for pages
remove_action( 'wp_head', 'feed_links_extra', 3 ); // extra feeds such as category
remove_action( 'wp_head', 'feed_links', 2 ); // general, post and comment feeds

//explicitly add feedburner link back into head
add_action('wp_head', 'addFeedburnerLink');

function addFeedburnerLink() {
  echo '<link rel="alternate" type="application/rss+xml" title="RSS 2.0 Feed" href="http://feedburner.com/myfeedburnerurl" />'; 
}

Hope that helps! You should also checkout http://wordpress.stackexchange.com . They tend to do a much better job with Wordpress codex/plugin related questions over there.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号