Support » Fixing WordPress » Comment-author’s website link takes user off my site

  • Resolved mwrmwr


    If a comment author enters a website URL in the place provided, when a viewer of that comment clicks on the author’s name it takes the user off my site to the comment-author’s site. To me, that’s really bad. I want (1) the comment-author’s site to open in a new window or (2) to remove the option to enter the comment-author’s website URL.

Viewing 7 replies - 1 through 7 (of 7 total)
  • I found the place in comments.php, a file in the template I’m using, that displayed the field to enter the comment author’s website URL. I just deleted those lines and now there’s no opportunity for the comment author to enter a website URL.

    In the “blog world”, is there a good reason to allow a comment author to include a website URL so the viewer can link to it?



    Forum Moderator

    Not especially. The choice is yours.



    Thanks to mwrmwt – as that answered a question i was about to post.

    good job!

    Arnold Goodway


    Your query has really got me thinking. By default WordPress adds a ‘nofollow’ link to the comment author’s site. This fact got many people up in arms and it in fact started the entire ‘dofollow’ movement. There are even plugins to ensure that these links are made ‘dofollow’ in WordPress.

    You now want to exclude the URLs totally. On most WordPress blogs this field is not compulsory, your commenters can leave it out when commenting. I am assuming that when you comment on other sites you do not leave your link on them.

    It will be interesting to see just what reaction this is going to get from the followers of your blog. It is sad but if the truth be told, many only comment because of the link.

    Your comment on opening links in a ‘new’ window also opens up another can of worms. Doing this means that your XHTML will not validate.

    (2)I totally agree with ArnoldGooway. You shouldn’t remove the link to your commenter’s website. It’s no-follow anyways.
    (1)To answer your 1st question, what you could use for those links to open in a new window would be a plugin called sem-external-links.
    I’m thinking this might do the job. Just enable the plugin and then go in the plugin’s option and select:
    – Apply globally
    – Open in new windows.
    Save changes and you should be all set. I just did it on my awesome-to-the-power-of-rad website and it works well.

    Belatedly adding that I restored the poster URL links but still don’t see a way to get those URLs to open in a new window. I just tried the plugin External Links and so far isn’t working for me (I’ve posted on their forum).

    Can anyone tell me where in WP the “external nofollow” attributes are inserted into the link? If I found that it would seem to be a simple matter to add target=_blank to those attributes.

    I found it in comment-template.php. Works fine.

    Added – target=’_blank’ – to line 149.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Comment-author’s website link takes user off my site’ is closed to new replies.