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
Be the first to comment