wordpress snippets last updated   : January 29, 2015
we now have 646 snippets

Remove wordpress category feeds

wordpress snippet

Adding this PHP code to the functions.php of your wordpress theme will remove the category feeds from wordpress still keeping your primary RSS feed.

snippet :  PHPcopy
remove_action( 'wp_head', 'feed_links_extra', 3 );

Did you like this post? If so please share it with your friends. Thanks!

  • http://www.matthewbennett.es MatthewBennett

    That’s great, I’ve been looking for this for ages, thanks…! Works well,

    • http://wpsnipp.com Kevin Chard

      Cool glad I could help!

  • Themauirob

    this looks promising for my needs. what’s the oldest version of wordpress this’ll work on? also, is there a way to simultaneously include only 1 (or several) category feeds, while blocking the rest?

    • http://wpsnipp.com Kevin Chard

      I’m sure this would work in 2.8 or 2.9+ not sure when it was added could have been  2.8. However you should be running the most recent version of wordpress many security and functionality updates have been released since 2.8. I don’t think that you can disable specific rss categories, this just removes the category feeds from the wp_head. You could however check the category you are in and then run this remove_action if not in a specific category.

      if ( !in_category( ‘CATEGORY_NAME’ )) {
      remove_action( ‘wp_head’, ‘feed_links_extra’, 3 );

  • http://telhacast.com/ Thiago Miro

    Is there a way to remove the feeds from single, tags and authors?