Skip to content

Instantly share code, notes, and snippets.

Created January 20, 2016 15:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/e6f1245b16fad2dba636 to your computer and use it in GitHub Desktop.
Save anonymous/e6f1245b16fad2dba636 to your computer and use it in GitHub Desktop.
<?php
// Die totale Abschaltung der RSS-Feeds
function ah_disable_feed() {
wp_die( __('Kein Feed verfügbar. Bitte besuchen Sie unsere <a href="'. get_bloginfo('url') .'">Startseite</a>!') );
}
add_action('do_feed', 'ah_disable_feed', 1);
add_action('do_feed_rdf', 'ah_disable_feed', 1);
add_action('do_feed_rss', 'ah_disable_feed', 1);
add_action('do_feed_rss2', 'ah_disable_feed', 1);
add_action('do_feed_atom', 'ah_disable_feed', 1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment