Thursday , 24 April 2014
Home » PHP Programming » Common Issues/Bugs » Open Comment Author url/link in new window of your wordpress blog
Open Comment Author url/link in new window of your wordpress blog

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.

About Rakshit Patel

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.

23 comments

  1. I have same configuration in my blogger blogspot.do you know how to navigate to commentators page in a new window in blogspot

  2. I have same configuration in my blogger blogspot.do you know how to navigate to commentators page in a new window in blogspot

  3. Nice snippet.
    I’ve got another way of doing it, and that DOESN’T REQUIRE EDITING WORDPRESS CORE. so in case if you update your wordpress in future you dont have to redo it again:
    here’s the link http://webdeveloperswall.com/wordpress/add-target-blank-to-user-link-in-recent-comments-widget

  4. Hi this is somewhat of off topic but I was wondering if blogs use WYSIWYG editors or if you have to manually code with
    HTML. I’m starting a blog soon but have no coding knowledge so I wanted to get guidance from someone with experience. Any help would be enormously appreciated!

  5. If you are going for finest contents like myself, only pay
    a visit this web site all the time because it presents feature contents, thanks

  6. As the admin of this website is working, no uncertainty very shortly it
    will be famous, due to its feature contents.

  7. Howdy! I simply want to give an enormous thumbs up for the great
    info you have got here on this post. I shall be coming back to your blog for more soon.

  8. I like what you guys are usually up too. This kind of clever work
    and coverage! Keep up the fantastic works guys I’ve included
    you guys to my personal blogroll.

  9. Way cool! Some extremely valid points! I appreciate you writing this write-up and
    the rest of the site is also very good.

  10. I do not even understand how I finished up here, but I thought this publish was great.
    I do not recognize who you are however definitely you are going to a well-known blogger
    if you happen to aren’t already. Cheers!

  11. Woah! I’m really loving the template/theme of this site.
    It’s simple, yet effective. A lot of times it’s challenging to get that “perfect balance” between superb usability and visual appeal.
    I must say you have done a amazing job with this. Additionally,
    the blog loads super quick for me on Safari. Exceptional Blog!

  12. I know this web site presents quality based content and other stuff, is
    there any other site which presents these information in quality?

  13. Nice post. I learn something new and challenging on sites I stumbleupon every day.
    It wwill always be exciting tto read articles feom
    other authors aand practice a little something from other sites.

  14. Hey! I just want to give a huge thumbs up for the nice information
    you will have here on this post. I might be coming back to your
    weblog for more soon.

  15. Hi to every one, the contents present at this web page are truly amazing
    for people experience, well, keep up the good work fellows.

  16. Hmm it seems like your website ate my first comment (it was extremely long) so I
    guess I’ll just sum it up what I had written and say, I’m thoroughly enjoying your blog.
    I as well am an aspiring blog blogger but I’m still new
    to the whole thing. Do you have any recommendations for beginner
    blog writers? I’d certainly appreciate it.

  17. It’s amazing for me to have a web site, which is good for my experience.
    thanks admin

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>