There are loads of articles out there on how to completely disable Wordpress RSS feeds, my configuration (functions.php
) is:
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.