How to Disable WordPress Built-in RSS Feed

I love WordPress built-in RSS feed, but I know some of you might not require this WordPress built-in RSS feed and thinking want to disable it from your blog or website, then you can follow the below steps by adding some simple code to your functions.php file, that’s all!

function 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 Jeff Starr shows us how to disable WordPress built-in RSS feed.

One Response to “How to Disable WordPress Built-in RSS Feed”

  1. 7 Undeniably Powerful Traffic Building Tips From Influential Bloggers | David Wood's MLM Marketing Prosperity Blog says:

    [...] below. Also opt-in to the email list on the right for more blogging tips, tricks and secrets. The other day I started reading a blog post on Think Traffic. Within 5 minutes of reading the blog …blog post; I knew I had to share some of its content. So here are 7 Undeniably powerful traffic [...]

  2. wordpress says:

    thank you

Leave a Reply

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