• How can I disable RSS or to linmit in certain posts -control it more easily from the admin.I would like to prevent the entire posts send by RSS feed.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You can’t disable RSS – either globally or per post. The best you can do is deny access to the feed files. if you would like to prevent the entire post appearing in RSS feed, set the feed to Summary in Settings->Discussion.

    Thread Starter similima

    (@similima)

    How can I deny access to the feed files. My site https://www.similima.com

    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 function.php file.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Restricting RSS’ is closed to new replies.