Disabling feeds on WPMU Dixi Theme

We currently have a multisite using the Dixi Theme.


We would like to disable feeds for a specific site (see the link above). Just for testing purposes. However, we don't want to disable feeds from all the other subsites.

I have a few links:
Code: http://www.wpbeginner.com/wp-tutorials/how-to-disable-rss-feeds-in-wordpress/

Plugin: http://wordpress.org/plugins/disable-feeds/

Would either of these work? Something else?

Thank you.

  • Vinod Dalvi

    Hi @thoomas,

    Thank you for your question.

    Try adding following code in the functions.php file of your child theme or add it in your site using any of the following plugins.

    function fb_disable_feed() {
    	if( in_array(get_current_blog_id(), array(2, 3))){ // Add blog ids in the array that you want to disable feeds for
    		wp_die( __('No feed available,please visit our <a href="'. get_bloginfo('url') .'">homepage</a>!') );
    add_action('do_feed', 'fb_disable_feed', 1);
    add_action('do_feed_rdf', 'fb_disable_feed', 1);
    add_action('do_feed_rss', 'fb_disable_feed', 1);
    add_action('do_feed_rss2', 'fb_disable_feed', 1);
    add_action('do_feed_atom', 'fb_disable_feed', 1);
    add_action('do_feed_rss2_comments', 'fb_disable_feed', 1);
    add_action('do_feed_atom_comments', 'fb_disable_feed', 1);


    In the above code change the blog ids to the blog id that you want to disable feeds.

    Best Regards,
    Vinod Dalvi

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.