There has been a bug in the WordPress core that strips target=”_blank” from any “a href” links added to the user’s “Biographical Info” field.
The links work fine, but they just won’t open in a new tab when clicked since target=”_blank” is automatically stripped from the link. This has been an issue for years now.
To fix it, simply add the code given below to your WordPress theme’s functions.php
file:
/* Add target="_blank" To WordPress Author Profile Bio Links */ | |
add_filter( 'get_the_author_description', 'digitalkube_target_blank_author_desc' ); | |
function digitalkube_target_blank_author_desc( $desc ) { | |
return str_replace( '<a', '<a target="_blank" ', $desc ); | |
} |
I hope this fixes the problem. If you still have any doubts, then feel free to drop a comment below.