WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Remove comments rss feed link

[Resolved] Remove comments rss feed link

  • RachelKaye

    @rachelkaye

    I’m wondering how to remove the comments rss feed link from the source of your page, not the actual visible link, but the “<link rel=”alternate” type=”application/rss+xml”… etc in the source code.

    Thanks.

Viewing 11 replies - 1 through 11 (of 11 total)
  • open your theme’s header.php and remove it?

    RachelKaye

    @rachelkaye

    Thank you for your reply.

    My header.php doesn’t contain the code, I think it is generated automatically by the wp_head.

    RachelKaye

    @rachelkaye

    Any help would be much appreciated.

    Same issue here, how do I remove that comments rss feed?

    I’m using thesis, so I don’t have access to the header.php file. Even if I did, shouldn’t there be a cleaner way to do this?

    My comments’ RSS feed appears before my posts’ RSS feed in the header, so people trying to subscribe get the comments RSS feed instead. Not good.

    RachelKaye

    @rachelkaye

    My header.php file doesn’t contain it, I don’t understand why no one is responding here, surely someone else has wanted to remove it in the past? Is it something that obvious and that’s why no one is replying?

    Please post if you know anything about it, it’s a big problem for me because the url that accesses the comments feed: mysite.com/comments/feed leads to a broken page because I actually have a folder on my site called mysite.com/comments.

    Literally going crazy here, removing the call to wp_head removes both RSS feeds but most of my plugins aren’t working if I do that!

    RachelKaye

    @rachelkaye

    Anyone?

    RachelKaye

    @rachelkaye

    Still looking please.

    Put remove_action( 'wp_head', 'feed_links' ); in your theme’s functions.php (or if you haven’t got one, make one and put <?php and ?> on new lines around the above.

    You’ll have to add in the link tag for your main RSS feed manually if you want it in your header.php again with something like:
    <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />

    @rachelkaye: Yep, removing the wp_head() call is a very, very bad idea.

    RachelKaye

    @rachelkaye

    Thank you very much for that Kawauso.

    removing this from functions works

    remove_action( ‘wp_head’, ‘feed_links’ );

    Old topic but….

    Put remove_action( 'wp_head', 'feed_links' ); in your theme’s functions.php

    This doesn’t appear to remove this:

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

    This is what I’m removing through theme’s functions.php file

    remove_action( 'wp_head', 'feed_links' );
    remove_action( 'wp_head', 'rsd_link');
    remove_action( 'wp_head', 'wlwmanifest_link');
    remove_action( 'wp_head', 'index_rel_link');
    remove_action( 'wp_head', 'parent_post_rel_link');
    remove_action( 'wp_head', 'start_post_rel_link');
    remove_action( 'wp_head', 'adjacent_posts_rel_link');
    remove_action( 'wp_head', 'wp_generator');
Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘[Resolved] Remove comments rss feed link’ is closed to new replies.