I am talking about this line of code
<link rel="alternate" type="application/rss+xml" title="example.com » 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
Try this one instead.
Yours is for things like category feeds if I recall correctly.
Based on link coolsaint provided you could remove both and then explicitly add back in the posts feed. It isn’t the most elegant, but it does mean you don’t have to modify the core WP files.
Adding this code to functions.php will remove all elements from your site that are related to RSS/Feeds.
Please Note: Before you remove this element from your site, make sure you know what this element is and why it is used. If you have lot of subscribers, then you may not want to delete this element.
This is an old question, but it appears that there are now filter hooks which can switch each feed independently (as you can see by examining the
feed_links
function code):