How To Remove Feeds From WordPress


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.

[php]
/** Disable RSS Feeds */
function mywp_disable_feed() {
wp_die( __(‘No feed available,please visit our Homepage!’) );
}
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);
[/php]

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.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *