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
$return = "<a class="url" href="$url" rel="external nofollow">$author</a>"
$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.
I am PHP Freelancer, Rakshit Patel AKA WordPress Freelancer working as PHP Programmer India. I am here to share all my developing knowledge, quick coding techniques, quick solutions to save your time and help you guys for any issue or bug fixing. If you have any PHP, WordPress, Magento related work, please contact me. I am interested for the work.