Tagged: Author link., header
-
AuthorPosts
-
June 30, 2015 at 5:46 am #466183
Hi,
How can I remove <link rel=”author” from being written into the head? It is conflicting with a plugin.
Thank you,
EricJune 30, 2015 at 9:24 am #466227Hi 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,
BasilisJune 30, 2015 at 9:32 pm #466716Hi,
What file do I modify/paste this code into? Thanks.
July 1, 2015 at 12:53 am #466747Hey!
Please add the code to functions.php file in Appearance > Editor
Best regards,
YigitJuly 1, 2015 at 2:24 am #466760Hi, 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.
*/July 1, 2015 at 2:26 am #466761Should 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’ );July 1, 2015 at 2:28 am #466762Lastly, 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
July 2, 2015 at 3:00 pm #467541Hey!
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,
AndyJuly 2, 2015 at 10:16 pm #467772Hi,
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!
-
AuthorPosts
- The topic ‘How to remove’ is closed to new replies.