I have searched and found a couple of very old answers to this question.
Can someone tell me how to remove all feeds from a WP blog using the latest (3.05) version of WP?
I sure would be grateful. Thank you!
I have searched and found a couple of very old answers to this question.
Can someone tell me how to remove all feeds from a WP blog using the latest (3.05) version of WP?
I sure would be grateful. Thank you!
The best that I could come up with is:
// Disable feeds
function my_disable_feed() {
wp_die( __('No feed available,please visit our <a href="'. get_bloginfo('url') .'">homepage</a>!') );
}
add_action('do_feed', 'my_disable_feed', 1);
add_action('do_feed_rdf', 'my_disable_feed', 1);
add_action('do_feed_rss', 'my_disable_feed', 1);
add_action('do_feed_rss2', 'my_disable_feed', 1);
add_action('do_feed_atom', 'my_disable_feed', 1);
which you can add to your theme's functions.php
Thank you so much! I will try it. :-)
How about if I just delete feed-related files? All of them. Wherever they are. Not that I know where they are. Or which ones.
I'd stay away from the core files, if I was you. Deleting odd files may cause problems elsewhere. Last time I tried the above code, it stopped any feed requests dead in their tracks.
Thanks for helping, again. I did try the code and it made all kinds of errors for me. Sorry but I kinda gave up for now. But thank you!
It's worked for me in the past (used again only a few weeks ago, in fact). Perhaps you added it in the wrong place within functions.php - ie inside an existing function or outside of the opening <?php and closing ?> tags?
This topic has been closed to new replies.