How to Set Up Comment URL Open in New Window for WordPress
October 29, 2011 Wordpress & Blogs
By default, comment url or link in wordpress blog will be opened in same window. How do I change visitor’s or author’s comment url open in new window (target=”_blank”)? Here is how to set up the php coding:
1. Open folder wp-includes/
2. Find and open this file: comment-template.php
3. Find and replace this codes:
Find function get_comment_author_link
Original code:
$return = "<a href='$url' rel='external nofollow' class='url'>$author</a>";
Replace with:
$return = "<a href='$url' rel='external nofollow' class='url' target='_blank'>$author</a>";
Good luck and try!
No related posts.











Lots of helpful information. I have bookmarked your site.
My site is Business Travel.
Good post! This is the kind of information that should be distributed on the online community. I would like to read more of this.
This tips are really helpful. Thanks, John.
You have a way with words. All the best with future posts, good work.