RSS feeds are definitely the amazing feature in the WordPress default. If someone have simple site or with any other reason and he doesn’t want to spread the articles and do not need the RSS feeds at all. He can disable his RSS feeds of WP blogs via hook in the current theme’s function file.

Add the following code into functions.php file.

/** Disable RSS Feeds */
function mywp_disable_feed() {
	wp_die( __('No feed available,please visit our <a href="'. get_bloginfo('url') .'">Homepage</a>!') );
add_action('do_feed',      'mywp_disable_feed', 1);
add_action('do_feed_rdf',  'mywp_disable_feed', 1);
add_action('do_feed_rss',  'mywp_disable_feed', 1);
add_action('do_feed_rss2', 'mywp_disable_feed', 1);
add_action('do_feed_atom', 'mywp_disable_feed', 1);

You may also be interested in our other articles on allow more tags in comments, disable auto generated paragraph tagsnofollow wordpress tag cloud and improve wordpress jpeg image quality.

Leave a Reply