Forums

How to remove Comment Feed link from Header? (5 posts)

  1. coolsaint
    Member
    Posted 9 months ago #

    I am talking about this line of code

    <link rel="alternate" type="application/rss+xml" title="example.com &raquo; Comments Feed" href="http://example.com/comments/feed/" />

    I have tried adding a remove action hook manually in template's functions.php

    remove_action('wp_head','feed_links_extra', 3);

    But it doesn't remove it.

    I have tried wordpress head cleaner plugin unfortunately it also couldn't remove it.

    At last I have edited wp-includes/default-filters.php and commented out

    add_action( 'wp_head', 'feed_links_extra',3);

    My comment feed links are still there. I prefer functions.php modification or plugins other than modifying the core files.

    I have tried disabling all the plugins and gone back to default theme but looks like the solution is not plugin or theme dependent. Unfortunately nothing works! I am using wordpress 3.2.1

  2. michaeltarallo
    Member
    Posted 8 months ago #

    Same here - did you ever find a solution?

  3. lakersalex
    Member
    Posted 6 months ago #

    Also looking for solution to removing broken comment feed link in my header, running 3.2.1. Thanks!

  4. dancort
    Member
    Posted 6 months ago #

    Algo here! Not possible to remove comments link from header on wordpress 3.2.1

  5. ms-studio
    Member
    Posted 4 months ago #

    Based on my testing in WP 3.3.1:

    remove_action( 'wp_head', 'feed_links' );

    has no effect.

    remove_action( 'wp_head', 'feed_links', 2 );

    does remove both the main RSS feed and the comments RSS feed, but does not remove the comments RSS feed of individual posts. if you apply this, you may want to re-apply the main RSS link in your theme's header.php, as described here (or by adding an action in your functions.php, as described here).

    remove_action('wp_head','feed_links_extra', 3);

    does remove the comments RSS feed in individual posts.

Reply

You must log in to post.

About this Topic