Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: How to disable rss ?

@bookespana

Member

Open your functions.php located inside your themes folder and add the subsequent code:
function fb_disable_feed() {
wp_die( __(‘No feed available,please visit our homepage!’) );
}

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

Once you add this code, anytime somebody tries to succeed in your feeds, they’ll see this message: “No feed on the market, please visit our homepage.” you’ll modification the message to suit your wants.

Skip to toolbar