Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #466183

    Hi,

    How can I remove <link rel=”author” from being written into the head? It is conflicting with a plugin.

    Thank you,
    Eric

    #466227

    Hi esotEric!

    That link comes from Yoast SEO. Try the following

    // Disable author links for pages
    function wpseo_disable_page_author_link( $link ) {
        if ( is_page() ) {
            return false;
        }
        return $link;
    }
    add_filter( 'wpseo_author_link', 'wpseo_disable_page_author_link' );

    and if t does not work, please contact them for their support.

    Regards,
    Basilis

    #466716

    Hi,

    What file do I modify/paste this code into? Thanks.

    #466747

    Hey!

    Please add the code to functions.php file in Appearance > Editor

    Best regards,
    Yigit

    #466760

    Hi, thanks for helping me. So I added the code and nothing changed. Am I supposed to put a closing ?> at the end or something? The functions.php file in the child theme, prior to adding the code, is this:

    <?php

    /*
    * Add your own functions here. You can also copy some of the theme functions into this file.
    * WordPress will use those functions instead of the original functions then.
    */

    #466761

    Should it be exactly this after modifying. Nothing more. Nothing less?:

    <?php

    /*
    * Add your own functions here. You can also copy some of the theme functions into this file.
    * WordPress will use those functions instead of the original functions then.
    */

    // Disable author links for pages
    function wpseo_disable_page_author_link( $link ) {
    if ( is_page() ) {
    return false;
    }
    return $link;
    }
    add_filter( ‘wpseo_author_link’, ‘wpseo_disable_page_author_link’ );

    #466762

    Lastly, Yoast talks about how to remove the author link, but nowhere does it say where/how to add the code: https://yoast.com/wordpress/plugins/seo/api/#examples

    #467541

    Hey!

    you should put it inside functions.php as Yigit already mentioned. I think the code should work. Can you provide us admin access, so we can check if you implemented it correctly? post login details here as private reply.

    Best regards,
    Andy

    #467772

    Hi,

    Thank you for your help! I reached out to the WPSSO plugin developers as well. They gave me similar code for functions.php, but said it’s easiest to simply disable the author link in their plugin’s advanced settings, which I did successfully. Problem fixed. Thanks again!

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘How to remove’ is closed to new replies.