Support » Themes and Templates » Remove /comments/feed/ link and link to from Twenty Ten

  • We have rebuilt out site using WP 3.0.1 twentyten multi site (EN and IT sites) and flag gallery. Very nice! Can someone please help with some mods:-
    1. every page has a link in the header to /comments/feed/
    We have removed comments and related feed from our site since it’s a CMS by adding the code to functions.php, how do we now remove this link, present on every page, to /comments/feed/
    <link rel=”alternate” type=”application/rss+xml” title=”The Lemon House » Comments Feed” href=”; />
    2. We had broken links pointing to / from links. Can we remove both such links and pointers to them? How do we do this? Any reasons not to do this?

    thanks Peter

Viewing 4 replies - 1 through 4 (of 4 total)
  • 1. Edit functions.php and remove:

    // Add default posts and comments RSS feed links to head
        add_theme_support( 'automatic-feed-links' );

    2. Where are these broken links?

    Thread Starter peteranne


    1. I want to keep posts rss feed but not the comments feed, will your fix do this? I wouldn’t have thought so looking at code. I did try adding this code
    function remove_comments_rss( $for_comments ) {
    which removed comments feed but NOT the link to it in every page whcih generates a 401 error on the site
    2. well they were there but are not anymore when I rechecked for broken links

    thanks for quick response


    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    1. No, that turns off both of them. If you want to only have one, then you’ll have to disable the automatic feed links and manually add what you want into the theme header.

    I think you’ll need to remove the automatic feed link support first and then add add a link to the posts feed back into header.php using something like<link rel="alternate" type="application/rss+xml" title="RSS 2.0 Feed" href="<?php bloginfo('rss2_url'); ?>" />.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Remove /comments/feed/ link and link to from Twenty Ten’ is closed to new replies.