Archive for Tag ‘autodiscovery‘

WordPress Quickie: Remove Feed Links

Photo by Stephen Burch - http://www.flickr.com/photos/stephenburch/3334570347/

Sometimes you just want to use WordPress as a simple content management system, and the site owners don’t plan to blog or have any content for which feeds really make sense. Its easy to not add subscription options to sidebars or footers, but don’t forget the autodiscovery links in the header, which look like this:

<link rel="alternate" type="application/rss+xml" title="Open Parenthesis RSS Feed" href="http://www.openparenthesis.org/feed" />

These links are what browsers like Firefox use to “autodiscover” the feeds and add the feed icon to the address bar. But what if you don’t want any feeds? Just add this line to your theme’s functions.php:

remove_theme_support('automatic-feed-links');

And voila, no more autodiscovery feed links.

There’s no codex page for remove_them_support(); but my guess is this requires WordPress 3.0 or later as that’s when 'menus', 'automatic-feed-links', 'custom-header', 'custom-background' and 'editor-style' were added to add_theme_support();.