Disable all feeds in WordPress
For disabling all feeds in WordPress just add below code to your functions.php in theme folder.
<?php function disableFeed() { wp_die(__('<h1>Sorry this feed is not available, please visit our <a href="'.get_bloginfo('url').'">Home Page</a>!</h1>')); } add_action('do_feed', 'disableFeed', 1); add_action('do_feed_rdf', 'disableFeed', 1); add_action('do_feed_rss', 'disableFeed', 1); add_action('do_feed_rss2', 'disableFeed', 1); add_action('do_feed_atom', 'disableFeed', 1); ?> |