An easy Hack to Disable RSS feeds in WordPress

Pin It


disable rss wordpressRSS feed is one of the best feature of WordPress for sharing post. But there are cases where feeds either have little importantce or does not have any roles to play as in static websites, CMS. For all who do not need RSS feature in WordPress it can be disabled with a little effort.

Step 1:

Create a new function in function.php located in your active theme folder like below:

/**
* disable RSS feed
*/
function wp_disable_feed() {
   wp_die( __('Sorry, no feeds available, return to <a href="'. get_bloginfo('url') .'">homepage</a>') );
}
 
add_action('do_feed', 'wp_disable_feed', 1);
add_action('do_feed_rdf', 'wp_disable_feed', 1);
add_action('do_feed_rss', 'wp_disable_feed', 1);
add_action('do_feed_rss2', 'wp_disable_feed', 1);
add_action('do_feed_atom', 'wp_disable_feed', 1);

I told you. Its very easy to disable feeds.

1 comment on this postSubmit yours
  1. Does Not Work.

    anything else to try?

1 pingback on this post
Submit your comment

Please enter your name

Your name is required

Please enter a valid email address

An email address is required

Please enter your message

Twitter

  • May 2, 2012 04:15

    10 Free WordPress Theme To Make You Forget About Premium Theme http://t.co/YRiLCiVa

  • March 2, 2012 17:16

    3 Helpful Tools to Test Cross Browser Compatibility of Webpage http://t.co/FY0jh8Dn

  • March 2, 2012 16:43

    3 Helpful Tools to Test Cross Browser Compatibility of Webpage http://t.co/QUlYKInf #IE #FF #Chrome #Testing #CrossBrowser

  • March 2, 2012 12:52

    Top 5 Plugins to Build Contact Form for WordPress http://t.co/PWyR08Iq #WordPress #Plugins #ContactForm

  • June 11, 2011 02:49

    CSS 3 Transitions http://bit.ly/m0pK3t

Design Gala © 2012 All Rights Reserved

Designed by 76miles

Powered by WordPress

More in WordPress (46 of 48 articles)
interactive video