Posted By

PM-Webdesign on 10/08/10


Tagged

rss wordpress feedburner


Versions (?)

Wordpress Feed links zu Feedburner leiten


 / Published in: PHP
 

URL: http://www.wpbeginner.com/wp-tutorials/25-extremely-useful-tricks-for-the-wordpress-functions-file/

Code in functions.php einf├╝gen

  1. function custom_feed_link($output, $feed) {
  2.  
  3. $feed_url = 'http://feeds.feedburner.com/wpbeginner';
  4.  
  5. $feed_array = array('rss' => $feed_url, 'rss2' => $feed_url, 'atom' => $feed_url, 'rdf' => $feed_url, 'comments_rss2' => '');
  6. $feed_array[$feed] = $feed_url;
  7. $output = $feed_array[$feed];
  8.  
  9. return $output;
  10. }
  11.  
  12. function other_feed_links($link) {
  13.  
  14. $link = 'http://feeds.feedburner.com/wpbeginner';
  15. return $link;
  16.  
  17. }
  18. //Add our functions to the specific filters
  19. add_filter('feed_link','custom_feed_link', 1, 2);
  20. add_filter('category_feed_link', 'other_feed_links');
  21. add_filter('author_feed_link', 'other_feed_links');
  22. add_filter('tag_feed_link','other_feed_links');
  23. add_filter('search_feed_link','other_feed_links');

Report this snippet  

You need to login to post a comment.