How to Disable RSS Feeds in WordPress

Do you need to disable RSS feeds in your WordPress web site? RSS feeds enable customers to subscribe to your weblog posts. Nevertheless when constructing small static web sites, you could need to flip off the RSS feeds. By default, there is no such thing as a choice to take away RSS feeds in WordPress. On this article, we’ll present you the best way to disable RSS feeds in WordPress.

Methodology 1: Disable RSS Feeds Utilizing a Plugin

This technique is simpler and is advisable for inexperienced persons.

Very first thing it is advisable to do is set up and activate the Disable Feeds plugin. For extra particulars, see our step-by-step information on the best way to set up a WordPress plugin.

The plugin works out of the field and it’ll begin redirecting customers to your web site after they request an RSS feed.

There are just a few settings accessible for the plugin. You could go to Settings » Studying web page to configure them.

By default, the plugin will attempt to redirect customers to associated content material in your web site after they request a feed. For instance, customers requesting a class feed will likely be redirected to class web page. Customers making an attempt to entry customized put up kind RSS feed will likely be redirected to the customized put up kind archive.

You’ll be able to change this conduct and present customers a 404 error web page.

You can too choose to not disable the worldwide RSS feed and feedback feed. This can enable customers to nonetheless subscribe to your RSS feed, however there will likely be no particular person class, creator, or put up remark feeds.

Don’t neglect to click on on the save adjustments button to retailer your settings.

Methodology 2: Manually Disable RSS Feeds in WordPress

This technique requires you edit WordPress recordsdata. You should use this technique in case you are comfy pasting snippets from internet into WordPress.

Merely add this code to your theme’s capabilities.php file or a site-specific plugin.

1
2
3
4
5
6
7
8
9
10
11
function wpb_disable_feed() {
wp_die( __('No feed available,please visit our <a href="'. get_bloginfo('url') .'">homepage</a>!') );
}
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);

This code merely returns an error web page when somebody requests an RSS feed.

You May Also Like : How to Add Content Locking in WordPress

We hope this text helped you learn to disable RSS feeds in WordPress. You may additionally need to see our record of 15 most annoying issues about WordPress and the best way to repair.

If you liked this article, make sure to hit the bell for getting our latest updates and share this article with your friends in every social media platforms.

1 thought on “How to Disable RSS Feeds in WordPress”

  1. Pingback: How to Add an Admin User in WordPress using FTP

Leave a Comment

Your email address will not be published. Required fields are marked *