Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.