4

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!

131
Thanks!
An error occurred!

No related posts.

Comments (4)

 

  1. Travel Tips says:

    Lots of helpful information. I have bookmarked your site.
    My site is Business Travel.

  2. Good post! This is the kind of information that should be distributed on the online community. I would like to read more of this.

  3. John Steven says:

    This tips are really helpful. Thanks, John.

  4. Cleotilde Mahaxay says:

    You have a way with words. All the best with future posts, good work.

Leave a Reply

Ultrabook notebook tipis harga murah terbaik

Sepeda Motor Injeksi Irit Harga Terbaik Cuma Honda

Honda PGM-FI Sepeda Motor Injeksi