Home › Forums › Support › Open URL from Comment Form in external Window This topic has 3 replies, 2 voices, and was last updated 6 years, 1 month ago by Tom. Viewing 4 posts - 1 through 4 (of 4 total) Author Posts March 14, 2018 at 11:37 pm #520346 Nathanael Hello, can you give me a php snippet, that the urls from the comment (provided in the url field) section open in a new window (with target=”_blank”)? Thank you, Nathanael March 15, 2018 at 10:04 am #520852 TomLead Developer Lead Developer Hi there, You could try this: add_filter( 'get_comment_author_link', 'tu_open_comment_author_link_in_new_window' ); function tu_open_comment_author_link_in_new_window( $author_link ) { return str_replace( "<a", "<a target='_blank'", $author_link ); } March 15, 2018 at 8:08 pm #521202 Nathanael Hi Tom, works perfectly. Thank you! March 16, 2018 at 12:38 am #521300 TomLead Developer Lead Developer You’re welcome 🙂 Author Posts Viewing 4 posts - 1 through 4 (of 4 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In