How to Disable RSS Feeds, Disabled unwanted WordPress Feeds

 In RSS Feeds

Does your website have only static content? Don’t want the RSS Feeds to be created and published? With this code, you can disable all types of feeds.

Introduction to Feeds

“A feed is a function of special software that allows feedreaders to access a site, automatically looking for new content and then posting the information about new content and updates to another site. This provides a way for users to keep up with the latest and hottest information posted on different blogging sites.
There are several different kinds of feeds, read by different feedreaders. Some feeds include RSS (alternately defined as “Rich Site Summary” or “Really Simple Syndication”), Atom or RDF files.”

Source : https://codex.wordpress.org/WordPress_Feeds

How to Disable RSS Feeds, Disabled unwanted WordPress Feeds – please add the code snippet below on your WordPress theme’s functions.php file.

function ns_disable_feed() {
 wp_die( __(‘No feed available, Please visit our <a href="">homepage</a> to see our site!’) );
}

add_action(‘do_feed’, ‘ns_disable_feed’, 1);
add_action(‘do_feed_rdf’, ‘ns_disable_feed’, 1);
add_action(‘do_feed_rss’, ‘ns_disable_feed’, 1);
add_action(‘do_feed_rss2′, ‘ns_disable_feed’, 1);
add_action(‘do_feed_atom’, ‘ns_disable_feed’, 1);

Thank you for seeing my tutorial and fell free to share and comment 🙂 . Do you have a code snippet and you want to see it publish on my site ? I will be more than happy to do it please send me a message (here)

Recommended Posts

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Start typing and press Enter to search

Let's work together

I'd love to work with you! Please fill out my project form to tell me more about your project/work. I reply to all enquiries within 48 hours.

Availability

  • September - Limited
  • October - Available
  • November - Available

Rates

  • My day rate is £250.
  • I can provide a fixed price for your work.

Header Enquiry Form

  • This form collects your name, email address and telephone number so that I can respond to the enquiry(ies) that you submit via this website. Please check my privacy policy for the full story on how I use, protect and manage your submitted data.