PDA

View Full Version : Can Comments link to New Window?


TR123
04-24-2007, 08:54 PM
Is there a way of making the commentators links open up in a new window in wordpress, the default seems to take people away from your site?

Thanks

Kevin
04-25-2007, 02:47 AM
i wouldnt say that they take away from your site. the comment box is simply placed on the full page of your post

you could by all means place the comments underneath your post on the home page and the archives but it would look really cluttered in my opinion.

pop up comments is not something ive used but i know its something wordpress can do. although its something i wouldnt consider since so many people have pop up blockers

TR123
04-25-2007, 07:54 AM
Hi, no sorry, I explained wrong. What I meant is when you click on a commentors name, their site opens up in the same window - takes people away from your site.

Kevin
04-25-2007, 08:12 AM
oh right
thats very easy to fix :)

you need to add a target="_new" or target="_blank" to the link

ill go see which template i need to edit :)

Kevin
04-25-2007, 08:46 AM
found it :)

open up your comment-template.php file

you can find it at wp-includes/comment-template.php

around line 48 you should see a line which reads

$return = "<a href='$url'>$author</a>";

change it to

$return = "<a href='$url' target='_blank'>$author</a>";

all done

TR123
04-25-2007, 08:47 AM
Ha ha! I will try and find the commentators bit and add that. Thanks

TR123
04-25-2007, 08:48 AM
I thought you were joking, you really have found the template I need to edit. Thanks

StephenWelton.com
05-13-2007, 10:04 PM
Perfect!
Too bad we were not able to do the same with the google ads. I think it's part of their terms?

Thanks for this. Changing the template now! It's the little tips like this that are going to make or break your experience better.

doorlight
09-05-2007, 01:43 PM
Nice, Kevin. I remember, I found a plugin for this but I can't remember where I got it. You know, I'm lazy to edit templates that I praise plugins more. lol.

shypys
09-06-2007, 07:01 PM
Nice, Kevin. I remember, I found a plugin for this but I can't remember where I got it. You know, I'm lazy to edit templates that I praise plugins more. lol.




Editing a line of code would certainly seem to be much more easier than finding a plugin, uploading it, and activating it....