How To Easily Disable RSS Feeds in WordPress

Loading

Do you want to disable RSS feeds in your WordPress website? RSS feeds allow users to subscribe to your articles. When constructing static websites, you might want to switch off the RSS feeds. There is no option to eliminate RSS feeds in WordPress. Supedium will show you how you can easily disable RSS feeds in WordPress.

Simply add this code into your theme’s functions.php file.

function wpb_disable_feed() {
wp_die( __('No feed available,please visit our homepage!') );
}
 
add_action('do_feed', 'wpb_disable_feed', 1);
add_action('do_feed_rdf', 'wpb_disable_feed', 1);
add_action('do_feed_rss', 'wpb_disable_feed', 1);
add_action('do_feed_rss2', 'wpb_disable_feed', 1);
add_action('do_feed_atom', 'wpb_disable_feed', 1);
add_action('do_feed_rss2_comments', 'wpb_disable_feed', 1);
add_action('do_feed_atom_comments', 'wpb_disable_feed', 1);
Share This
0Shares

0
See also  Which Hosting Type Do You Need?
  • Be the first to comment

Back to top of page

Register / Login

Message from SUPEDIUM®


Welcome to SUPEDIUM®, to ensure you have seamless experience when browsing our website, we encourage all users to register or login. It only takes less than 2 minutes to register an account :)

Register / Login with Email

Register / Login with Google

This will close in 30 seconds

Sign in

rotate_right

Send Message

image

My favorites

image