Support » Fixing WordPress » Removing Automatic feed links from header

  • Resolved igorx81


    Hi, I’ve tried to modify some files in wp-includes but with no result.

    How can I remove the whole line

    <link rel=”alternate” type=”application/rss+xml” title=”Site Title ยป Post Title Comments Feed” href=”” />

    from each post header?

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • esmi


    Forum Moderator

    No! Never, ever, edit WordPress core scripts. And do not encourage others to do so. Editing core scripts can bring down your entire site and/or open security holes for hackers to use.

    Re-upload a fresh copy of the wp-includes folder then try adding:

    // Remove auto generated feed links
    function my_remove_feeds() {
    	remove_action( 'wp_head', 'feed_links_extra', 3 );
    	remove_action( 'wp_head', 'feed_links', 2 );
    add_action( 'after_setup_theme', 'my_remove_feeds' );

    to your theme’s functions.php file.



    Thanks a lot.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Removing Automatic feed links from header’ is closed to new replies.