Title: Comments Help
Last modified: August 18, 2016

---

# Comments Help

 *  [joeistoxic](https://wordpress.org/support/users/joeistoxic/)
 * (@joeistoxic)
 * [21 years ago](https://wordpress.org/support/topic/comments-help-3/)
 * Ok so i need some help. When someone adds a comment on my blog and i click their
   link, it doesen’t open in a new window. Please can anyone help me fix this?

Viewing 12 replies - 1 through 12 (of 12 total)

 *  [emt036](https://wordpress.org/support/users/emt036/)
 * (@emt036)
 * [21 years ago](https://wordpress.org/support/topic/comments-help-3/#post-199275)
 * This is not the default behavior of WordPress…. You’d have to hack into the core
   to change it.
 * In wp-includes/comment-functions.php, find:
 * `function get_comment_author_link() {
    global $comment; $url = get_comment_author_url();
   $author = get_comment_author();
 *  `if ( empty( $url ) )
    $return = $author; else $return = "<a href='$url' rel
   ='external nofollow'>$author</a>"; return apply_filters('get_comment_author_link',
   $return); }
 * Change the return line to:
    `$return = "<a href='$url' rel='external' target='
   _blank'>$author</a>";`
 * Note that the target attribute is not valid XHTML 1.0 Strict, but its up to you
   if you care about that.
 *  [vkaryl](https://wordpress.org/support/users/vkaryl/)
 * (@vkaryl)
 * [21 years ago](https://wordpress.org/support/topic/comments-help-3/#post-199276)
 * Instead of `target="_blank"` you can use `onclick="window.open(this.href);return
   false;"` – works just fine.
 *  [emt036](https://wordpress.org/support/users/emt036/)
 * (@emt036)
 * [21 years ago](https://wordpress.org/support/topic/comments-help-3/#post-199279)
 * Sorry, I learned HTML before all this fancy script stuff 🙂
 *  [vkaryl](https://wordpress.org/support/users/vkaryl/)
 * (@vkaryl)
 * [21 years ago](https://wordpress.org/support/topic/comments-help-3/#post-199280)
 * *laughing* S’okay, not really a script, just a different way to do the whole “
   open elsewhere” thingy. What I posted above is used, for instance, like this:`
   <a href="http://example.com/index.php" onclick="window.open(this.href);return
   false;">` – basic html addy that opens a new window.
 * I don’t see any reason it wouldn’t work for the href in the `$return` call, though
   of course, I could easily be wrong. (I quite frequently am!)
 *  Thread Starter [joeistoxic](https://wordpress.org/support/users/joeistoxic/)
 * (@joeistoxic)
 * [21 years ago](https://wordpress.org/support/topic/comments-help-3/#post-199394)
 * Could someone do it for me please?
 *  Thread Starter [joeistoxic](https://wordpress.org/support/users/joeistoxic/)
 * (@joeistoxic)
 * [21 years ago](https://wordpress.org/support/topic/comments-help-3/#post-199396)
 * Shit i just buggered it up. It doesen’t say who commented now, it just says Says:
 * Please help..
 *  Thread Starter [joeistoxic](https://wordpress.org/support/users/joeistoxic/)
 * (@joeistoxic)
 * [21 years ago](https://wordpress.org/support/topic/comments-help-3/#post-199398)
 * [Moderated – huge code chunk deleted]
 *  Thread Starter [joeistoxic](https://wordpress.org/support/users/joeistoxic/)
 * (@joeistoxic)
 * [21 years ago](https://wordpress.org/support/topic/comments-help-3/#post-199676)
 * Anyone? Please..
 *  [emt036](https://wordpress.org/support/users/emt036/)
 * (@emt036)
 * [21 years ago](https://wordpress.org/support/topic/comments-help-3/#post-199699)
 * Sorry been studying for final exams.
 * [Here](http://www.subaquasternalrubs.com/comment-functions.phps) is the version
   that works for me (WP 1.5 only)
 * Save this as comment-functions.php, and put it in your /wp-includes/ directory.
   Should be all set after that.
 *  [musicroad](https://wordpress.org/support/users/musicroad/)
 * (@musicroad)
 * [21 years ago](https://wordpress.org/support/topic/comments-help-3/#post-199700)
 * is these for the comments post body enter [http://fghhh.com/](http://fghhh.com/)
   then click on link while viewing comment in blog open in new windows?
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [21 years ago](https://wordpress.org/support/topic/comments-help-3/#post-199708)
 * Any moderators around to delete all that code above?
 *  Thread Starter [joeistoxic](https://wordpress.org/support/users/joeistoxic/)
 * (@joeistoxic)
 * [21 years ago](https://wordpress.org/support/topic/comments-help-3/#post-199713)
 * It worked ! Thank you so much!

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘Comments Help’ is closed to new replies.

## Tags

 * [window](https://wordpress.org/support/topic-tag/window/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 12 replies
 * 5 participants
 * Last reply from: [joeistoxic](https://wordpress.org/support/users/joeistoxic/)
 * Last activity: [21 years ago](https://wordpress.org/support/topic/comments-help-3/#post-199713)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
