Looking to Build/Redesign a Website or Blog ?

To speak to Rakshit, call +91 968 704 2303

Open Comment Author url/link in new window of your wordpress blog

Hello Friends,
I am using wordpress blog and i want to do change when visitors/author give comment in post/article in wordpress blog,the author url/link should open in new window so when any visitor will look at comment and if they want to go in author's website than website will open in new window(target = '_blank'). Main objective is , visitor still have your site open in tab or window and they will not navigate from your wordpress blog.

Below is the solution how to add target='_blank' in comment url of your wordpress blog.

1) Logged in to FTP/C-Panel
2) Open wp-includes/comment-template.php

Find function get_comment_author_link

Find :
$return = "<a class="url" href="$url" rel="external nofollow">$author</a>"

Replace :
$return = "<a class="url" href="$url" rel="external nofollow" target="_blank">$author</a>"

Now save that file and look at a post with comment. Surely it works.

To know more about programming,JavaScript issues,jQuery,Expression Engine,MYSQL database,php info,php editor,programming php,Open-source,php help and php script , subscribe to our feed by entering email address below. You will get updates via email about every tutorial posted on this site . It will not take more than a sec.

Enter your email address:
Feel free to ask any question. Just leave your comment below and we will answer your comment with in 24 hours.