How to Disable RSS Feeds

 In RSS Feeds

How to Disable RSS Feeds
Does your website have only static content? Don’t want the RSS Feeds to be created & published? With this code, you can disable all types of feeds.

function tpk_disable_feed() {
wp_die( __(‘No feed available, Please visit our <a href="">homepage</a> to see our site!’) );

add_action(‘do_feed’, ‘tpk_disable_feed’, 1);
add_action(‘do_feed_rdf’, ‘tpk_disable_feed’, 1);
add_action(‘do_feed_rss’, ‘tpk_disable_feed’, 1);
add_action(‘do_feed_rss2′, ‘tpk_disable_feed’, 1);
add_action(‘do_feed_atom’, ‘tpk_disable_feed’, 1);
Recommended Posts

Leave a Comment

Start typing and press Enter to search