Support » Fixing WordPress » How to remove comments and feed links in header

  • Hello

    I have searched all over and have found the same answers but none of them seem to work.

    Does anyone have any idea on how to remove the comments and feed links from the header?

    <link
    rel=”alternate” type=”application/rss+xml” title=”Pentaho Evaluation Sandbox » Feed” href=”http://sandbox.pentaho.com/feed/&#8221; />

    <link
    rel=”alternate” type=”application/rss+xml” title=”Pentaho Evaluation Sandbox » Comments Feed” href=”http://sandbox.pentaho.com/comments/feed/&#8221; />

    I was told to put this in the custom-functions.php of my theme with my others that do work:

    These two do not work

    remove_action(‘wp_head’, ‘feed_links_extra’);
    remove_action(‘wp_head’, ‘feed_links’);

    These work for the other stuff

    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_wp_head’);
    remove_action(‘wp_head’, ‘rsd_link’);
    remove_action(‘wp_head’, ‘wlwmanifest_link’);

    The links are still in there, when I view the source.

    Thanks for your time

Viewing 3 replies - 1 through 3 (of 3 total)
  • Never mind – my Catalyst theme had them hidden deep named: catalyst_feed_links

    For all those that comes across this post with a similar problem – you need to check your theme’s header files – I found mine in catalyst-header.php

    HTH

    Hi,

    I’ve had the same problem at my site LaptopHQ, and only after studying wp-includes/default-filters.php I was able to fix it. It turns out that you need to remove the action with the same parameters it was added. In your case, try this:

    remove_action('wp_head', 'feed_links_extra', 3); // Remove category feeds
    remove_action('wp_head', 'feed_links', 2); // Remove Post and Comment Feeds
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to remove comments and feed links in header’ is closed to new replies.