Completely Disable WordPress RSS Feeds
-
There are loads of articles out there on how to completely disable WordPress RSS feeds, my configuration (
functions.php
) is simply:function disable_feed() { wp_die( 'You Died' , 200 ); } add_action('do_feed', 'disable_feed', 1); add_action('do_feed_rdf', 'disable_feed', 1); add_action('do_feed_rss', 'disable_feed', 1); add_action('do_feed_rss2', 'disable_feed', 1); add_action('do_feed_atom', 'disable_feed', 1); add_action('do_feed_rss2_comments', 'disable_feed', 1); add_action('do_feed_atom_comments', 'disable_feed', 1);
But instead of getting a nice-looking HTML page with the bordered content normally associated with the
wp_die()
function, when browsing to https://website/feed/ I’m getting this knarley page back:Anyone know what I’m doing wrong?
David.
Viewing 14 replies - 1 through 14 (of 14 total)
Viewing 14 replies - 1 through 14 (of 14 total)
- The topic ‘Completely Disable WordPress RSS Feeds’ is closed to new replies.