WordPress.org

Ready to get started?Download WordPress

Forums

Remove /comments/feed/ link and link to wp.me from Twenty Ten (5 posts)

  1. peteranne
    Member
    Posted 3 years ago #

    We have rebuilt out site http://www.peteranne.it 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="http://www.peteranne.it/comments/feed/" />
    2. We had broken links pointing to / from wp.me links. Can we remove both such links and pointers to them? How do we do this? Any reasons not to do this?

    thanks Peter

  2. esmi
    Forum Moderator
    Posted 3 years ago #

    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?

  3. peteranne
    Member
    Posted 3 years ago #

    1. I want to keep posts rss feed http://www.peteranne.it/blog/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 ) {
    return;
    }
    add_filter('post_comments_feed_link','remove_comments_rss');
    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

    Peter

  4. Samuel Wood (Otto)
    Tech Ninja
    Posted 3 years ago #

    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.

  5. esmi
    Forum Moderator
    Posted 3 years ago #

    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'); ?>" />.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.