In that situation you need to use following techniques. We given tricks, techniques and code for block your rss feed in wordpress website. Many people does not want to show their websites need to be cached or indexed by search engine. In that situation you need to use following techniques.
How to block your rss feed in wordpress website
First create the robots.txt file and put following code in that file.
User-agent: * Disallow: /
You need to open functions.php file for disabling the rss feed from your website.
Put following code in that file.
function disable_rss_feed() { wp_die( __('No Rss feed are available,please visit our <a href="'. get_bloginfo('url') .'">website</a>!') ); } add_action('do_feed', 'disable_rss_feed', 1); add_action('do_feed_rdf', 'disable_rss_feed', 1); add_action('do_feed_rss', 'disable_rss_feed', 1); add_action('do_feed_rss2', 'disable_rss_feed', 1); add_action('do_feed_atom', 'disable_rss_feed', 1);
Question:
Is it possible to disable rss feeds — for “non-members” of a site — but still allow members to use them?
it is possible…through code..need to check user login