The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

[resolved] Removing Automatic feed links from header (3 posts)

  1. igorx81
    Posted 4 years ago #

    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="http://www.site.com/posturl/feed/" />

    from each post header?

    Thank you.

  2. esmi
    Forum Moderator
    Posted 4 years ago #

    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.

  3. igorx81
    Posted 4 years ago #

    Thanks a lot.

Topic Closed

This topic has been closed to new replies.

About this Topic