• Apparently this is something specific for newer versions of WordPress because the straight forward code use to be right in the header and I’ve done it before, but now it is gone and the only way I’ve found to remove it is by removing a little line of code

    <?php wp_head(); ?>

    But when you remove that, it removes a bunch of other mystery stuff also and is breaking a plugin I am using. Any ideas?

Viewing 1 replies (of 1 total)
  • Replace <?php wp_head(); ?> and then try adding:

    // 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);

    to your theme’s functions.php file.

Viewing 1 replies (of 1 total)
  • The topic ‘Removing RSS Feeds’ is closed to new replies.