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

  • Pingback: Wordpress als CMS ohne RSS | Blogger World

  • seb

    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

    • http://clifgriffin.com clifgriffin

      I’m not sure I understand.

      After enabling my plugin, your RSS feed(s) return a 500 error?

      • sebastien

        Yes it seems it works but what about old posts ? (error 500)

        and escuse me for my english, isn’t rich ;o)

        • http://clifgriffin.com clifgriffin

          I’m not sure what you mean by old posts. The plugin simply disables the functions that generate the RSS feeds.

          Can you give me the link for your blog so I can see what you’re talking about?

  • http://arvidtp.net arvid

    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

  • Pingback: 18 WordPress Plugins for RSS Management & Tweaks

  • Pingback: 18 WordPress Plugins for RSS Management and Tweaks | KGRAND ONLINE NEWS

  • Pingback: 18 WordPress Plugins for RSS Management and Tweaks - F.ollow.me - http://twitter.com/riku

  • Pingback: 18 WordPress Plugins for RSS Management | DawidRyba Blog

  • Diane

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

    • http://clifgriffin.com clifgriffin

      It disables the RSS feeds without discrimination or exception. :-)

  • http://mpgclinics.net p0w3r

    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

    • http://clifgriffin.com clifgriffin

      It disables the RSS feed. It doesn’t remove the link to it. :)

  • http://www.blythefashion.com anne

    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 !

  • rene

    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.

  • Pingback: 11 Wordpress Плъгина за RSS

  • Pingback: Disha Hosting » Wordpress tips for RSS plugins.

  • Pingback: 18 WordPress Plugins for RSS Management and Tweaks « Alex DiggMore

  • http://timothyaaron.com TimothyAaron

    Actually, I released this exact code as a plugin 3 months before Lifehacker’s article; couldn’t believe nobody had done it yet. …seemed so simple.

    http://wordpress.org/extend/plugins/feed-disabler/

    • http://www.designbylanoue.com Michael LaNoue

      This is an awesome plugin… thanks a million!

  • Pingback: Just Social » 18 Wordpress plugins for RSS Management tweaking

  • Pingback: 18 RSS Management and Tweaks for WordPress Plugins | oOrch Blog

  • Pingback: 18 WordPress-плагинов для работы с RSS : Социальные медиа новости и web гид – NIPL.ru – Русская версия Mashable

  • Pingback: 18 Plugin giúp bạn quản lý RSS trong wordpress | NgocThach Blog

  • Pingback: 18 Plugin giúp bạn quản lý RSS trong wordpress | wWw.NgocTuanVn.OrG

  • john

    It dose not remove the icon.

    • http://clifgriffin.com Clifton Griffin

      It’s not supposed to. That’s built into the theme. This just ensures the feed itself is inaccessible.

  • http://redspiral.me Yogesh Nagarur

    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).

    • http://redspiral.me Yogesh Nagarur

      Sorry, I retract that last comment. It worked fine after I deleted my cache. :)

  • Andrew

    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.

  • Andrew

    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.

  • 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 !

  • Pingback: 18 WordPress Plugins for RSS Management and Tweaks | IdolMasti

  • Pingback: Supprimer / Désactiver les flux RSS sous Wordpress

  • http://www.center-tools.info/ Michele

    The plug-in “Disable RSS 1.0″ works with wordpress 2.9.2?

  • Pingback: 18 Great WordPress Plugins for RSS Feed Management & Tweaks | Wordpress How To's | Customizations | Tips | Themes | Plugins | Hosting | Books

  • crypto.scythe

    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);
    
    • http://clifgriffin.com Clifton Griffin

      That’s surprising. :)

      I’ll implement your suggestion soon.

  • Pingback: CAP Marketer - 18 Plugins WordPress pour la gestion des flux RSS et Tweaks (en Anglais)

  • Antonio

    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

    • http://clifgriffin.com Clifton Griffin

      Disabling the plugin should work just fine. I’ve reviewed the code and don’t see any issue.

  • Stacy

    Not compatible with my Buddypress themes.

    • http://clifgriffin.com clifgriffin

      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

      • Stacy

        Bp has an activity feed which is not needed.

  • Stacy

    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”.

  • http://profiles.google.com/arty69 Artem K

    Good ! Try it on http://uakino.net

  • arnold

    it works wonderfully :)

    THANKS A TRILLION TRILLION TRILLION !!!

  • http://www.678passengervehicles.com Alex

    Thank you! It’s working great in Verizon 3.2.1.  I had an issue with turkeys stealing content.