Disable RSS Plugin for WordPress


Find a bug?

If you believe you have found a bug, please open a ticket here. This will allow me to track the issue as a single issue and others to comment and give feedback.

I’m finding it difficult to discern user error from bug from configuration differences among different installations. All of this will lead to a quicker turn around for reported issues. Isn’t that cool?

If you're feeling generous.

Official WordPress Link

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

, ,

  1. #1 by seb at December 16th, 2008

    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 by clifgriffin at December 17th, 2008

      I’m not sure I understand.

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

      • #3 by sebastien at December 18th, 2008

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

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

        • #4 by clifgriffin at December 18th, 2008

          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?

  2. #5 by arvid at March 7th, 2009

    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. #6 by Diane at April 5th, 2009

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

  4. #8 by p0w3r at April 18th, 2009

    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. #10 by anne at May 3rd, 2009

    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. #11 by rene at May 10th, 2009

    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. #12 by TimothyAaron at August 19th, 2009

    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/

  8. #14 by john at December 9th, 2009

    It dose not remove the icon.

    • #15 by Clifton Griffin at December 9th, 2009

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

  9. #16 by Yogesh Nagarur at January 2nd, 2010

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

  10. #18 by Andrew at January 18th, 2010

    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.

  11. #19 by Andrew at January 18th, 2010

    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.

  12. #20 by Corentin at March 25th, 2010

    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 !

  13. #21 by Michele at May 14th, 2010

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

  14. #22 by crypto.scythe at July 22nd, 2010

    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);
    
(will not be published)