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.
remove_action( 'wp_head', 'feed_links', 2 );
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.
add_action('wp_head', 'addBackPostFeed');
function addBackPostFeed() {
echo '<link rel="alternate" type="application/rss+xml" title="RSS 2.0 Feed" href="'.get_bloginfo('rss2_url').'" />';
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With