Disable RSS Plugin for WordPress

Smashing Magazing did a post today including several RSS related WordPress hacks.   One of them featured a method to disable all RSS feeds. As they say:

“Let’s say you’re using WordPress as a CMS to manage your online portfolio or your company’s website. In such cases, the RSS feed isn’t that useful, and some people would probably want to remove it.”

Notably, they did not encapsulate the functionality in a plugin. So I will be converting the ones without a associated plugin into plugins over the coming days. This is the first one.

Simply put, all you have to do is upload the plugin, activate it, and viola! No more RSS feeds. You can edit the error message users receive by editing the actual plugin file. (disable-rss.php)

The code:

add_action('do_feed', 'fb_disable_feed', 1);
add_action('do_feed_rdf', 'fb_disable_feed', 1);
add_action('do_feed_rss', 'fb_disable_feed', 1);
add_action('do_feed_rss2', 'fb_disable_feed', 1);
add_action('do_feed_atom', 'fb_disable_feed', 1);
 
function fb_disable_feed() {
	wp_die( __('No feed available,please visit our <a href="'. get_bloginfo('url') .'">homepage</a>!') );
}

Download Disable RSS 1.0 for WordPress 2.7-RC1 Now…
Disable RSS 1.0 for WordPress 2.7-RC1

Comments

  1. seb says

    One question: what is about when you publish an article .

    I have a error 500 for the last articles feed and comments feed on my blog..

    The next will be publish without comments/feed and feed?

    Thanks fot this.
    Sébastien

  2. says

    Doesn’t seem to work in WP 2.7. or 2.7.1

    RSS is still there.

    When I try to add the code manually to functions.php I get an error

  3. Diane says

    Hi, Does the plug-in that disables RSS also stop feed readers like Bloglines from accessing the feed?

  4. says

    Ur plugin not working, for my WP 2.7 Still have that Stuppid RS, how do i remove this sh*t ?
    I HATE THIS “If you enjoyed this post Subscribe to our feed”
    How can i remove it ??? It’s all over my Posts on my web

  5. says

    Just installed the plugin, it’s working fine, thank you !

    I had published an article and after a few minutes went on to edit it quite heavily and I was so embarrassed to still find the old version in my feed reader (I use Vienna).

    Googled to find a solution, and here I am. I don’t think I have many readers through rss, but I certainly do not want that to happen again.

    So thank you !

  6. rene says

    Hi,
    Brilliant plug-in and plug and play as well.
    I am using it for a CMS type of website with posts that may only be viewed by specific logged in members. RSS was the backdoor I forgot initially.
    Great work.

  7. Andrew says

    Andrew :
    I love the plug-in, it works with Firefox and Safari well on WP 2.8.6. However on Safari I don’t get the nice plug-in message I get with Firefox. Any ideas?
    As for an enhancement, I would like to see a re-direct to a WP page without the message in between.
    Thanks again.

  8. Corentin says

    Hi, and thanks for your plugin.

    I have a question: how is it possible to deactivate the plugin ? Even if I do so in the plugin menu, the previous links to the RSS feeds can’t be restored. What can I do to get back my feeds, please ?

    Thanks in advance !

  9. crypto.scythe says

    Lovable, the plug-in even works in WP 3 ^_^
    As I haven’t found anything on that topic I have something to add to the plug-in as I wanted to remove the comments feed in WP 3 too.

    add_action('do_feed_comments-', 'fb_disable_feed', 1);
    add_action('do_feed_comments-rdf', 'fb_disable_feed', 1);
    add_action('do_feed_comments-rss', 'fb_disable_feed', 1);
    add_action('do_feed_comments-rss2', 'fb_disable_feed', 1);
    add_action('do_feed_comments-atom', 'fb_disable_feed', 1);
    
  10. Antonio says

    Corentin :
    Hi, and thanks for your plugin.
    I have a question: how is it possible to deactivate the plugin ? Even if I do so in the plugin menu, the previous links to the RSS feeds can’t be restored. What can I do to get back my feeds, please ?
    Thanks in advance !

    Hi i have same problem please help.

    I use last wordpress.

    Best Regards

    • says

      Hi Stacy,
      This disables the feed for everyone. If your theme requires a feed, no plugin with this functionality will work. If the problem is that you still see the links for the feed, that is by design. You’ll have to modify the theme to hide these…this only shuts off the connection.

      Clif

  11. Stacy says

    Hello again, I am trying to omit the link for “no feed available ect” but it deactivates the plugin. How exactly would I write in an external link at least so that it doesn’t redirect to an error page, or any page on my site? I don’t want it to “get blog info”.

  12. says

    Plugin works fine and a good plugin :).

    I have 1 problem this plugin works fine in FF but in Google Chrome you can still see the RSS (Not with Atom 0.3 but with the other one).

  13. Andrew says

    I love the plug-in, it works with Firefox and Safari well. However on Safari I don’t get the plug-in message I get with Firefox. Any ideas?

    As for an enhancement, I would like to see a re-direct to a WP page without the message in between.

    Thanks again.

Trackbacks

  1. [...] Disable RSS – Если вы используете WordPress в качестве основной CMS для вашего сайта, то вам стоит отключить функцию RSS-подписки, которая стоит по умолчанию. Плагин Disable RSS поможет уничтожить все доступные RSS-потоки. [...]

Leave a Reply