Inspiration For Creative Minds
Home » Labs » Disable all feeds in WordPress  

Filed under Labs

For disabling all feeds in WordPress just add below code to your functions.php in theme folder.

	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);	
It's only fair to share...Share on Google+Tweet about this on TwitterShare on Facebook

Posts you may like: