Posted By

gabbo on 01/20/14


Tagged

php wordpress


Versions (?)

Last Edited at 01/20/14 08:07pm

Viewed 4 times

Disable WordPress RSS-Feed via functions.php


/ Published in: PHP

http://bueltge.de/wordpress-feeds-deaktivieren/794/

  1. /**
  2.  * disable feed
  3.  */
  4. function fb_disable_feed() {
  5. wp_die( __('Kein Feed erreichbar, besuchen Sie doch bitte die <a href="'. get_bloginfo('url') .'">Startseite</a>!') );
  6. }
  7.  
  8. add_action('do_feed', 'fb_disable_feed', 1);
  9. add_action('do_feed_rdf', 'fb_disable_feed', 1);
  10. add_action('do_feed_rss', 'fb_disable_feed', 1);
  11. add_action('do_feed_rss2', 'fb_disable_feed', 1);
  12. add_action('do_feed_atom', 'fb_disable_feed', 1);

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.