Quantcast
Channel: WPRecipes
Viewing all articles
Browse latest Browse all 121

How to disable RSS feeds on your WordPress blog

$
0
0

Paste the code below into your functions.php file. RSS feeds will not be available anymore after you saved the file.

unction digwp_disable_feed() {
	wp_die(__('<h1>Feed not available, please visit our <a href="'.get_bloginfo('url').'">Home Page</a>!</h1>'));
}
add_action('do_feed',      'digwp_disable_feed', 1);
add_action('do_feed_rdf',  'digwp_disable_feed', 1);
add_action('do_feed_rss',  'digwp_disable_feed', 1);
add_action('do_feed_rss2', 'digwp_disable_feed', 1);
add_action('do_feed_atom', 'digwp_disable_feed', 1);

Thanks to Jeff Starr for the cool tip!


Viewing all articles
Browse latest Browse all 121

Trending Articles