WordPress: RSS-Feed deaktivieren

Findet WordPress als CMS Verwendung, also mit festen Inhalten ohne News-Sektion  o.ä., ist das Bereitstellen eines RSS-Feeds mitunter unnötig; mit folgender Erweiterung der functions.php-Datei des Themes kann der Feed abgeschaltet werden:

function fb_disable_feed() { wp_die( __('Kein Feed erreichbar, besuchen Sie die <a href="'. get_bloginfo('url') .'">Startseite</a>!') ); }

add_action('do_feed', 'fb_disable_feed', 1);
add_action('do_feed_rdf', 'fb_disable_feed', 1);
add_action('do_feed_rss', 'fb_disable_feed', 1);
add_action('do_feed_rss2', 'fb_disable_feed', 1);
add_action('do_feed_atom', 'fb_disable_feed', 1);