WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Whenever a user presses on a comments author it redirects the user to the site which was enetered by user. I just want to add the target="_blank" element. where I can modify this?

In file i see only this: get_comment_author_link()

share|improve this question

You would have to use the get_comment_author_link filter for this in the following manner.

add_filter( "get_comment_author_link", "wpse_63316_modifiy_comment_author_anchor" );
function wpse_63316_modifiy_comment_author_anchor( $author_link ){
    return str_replace( "<a", "<a target='_blank'", $author_link );
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.