Thanks for the quick response Kafkaesqui. The second link works for me when put in the comment loop, but the first one doesn’t do anything. Am i suppose to add anything inside the brackets?
<p><?php comment_author_link(); ?></p>
I’ve just stuck that straight in…
Thanks,
Nick
Ok, I’m going to go with the second link. http://codex.wordpress.org/Template_Tags/comment_author_url_link. This works fine for me but is there any way to not show the link if no information was entered into the website input field? At the moment it shows “visit author’s website” for everyone, and if they dont enter an info, the link just goes to my website.
THanks
This is a mod of what I have in my comments template:
<?php
if( get_comment_author_url() ) : ?>
<a href="<?php comment_author_url(); ?>"><?php comment_author(); ?></a>
<?php else : ?>
<?php comment_author(); ?>
<?php endif; ?>
That tests if get_comment_author_url() returns a value, displaying the comment author’s name as a link to their site when it does, and plain when it doesn’t.
(@greenblue)
18 years, 4 months ago
Hi,
I’ve had a search for this but can’t seem to find it in the forums. There is a field for website in the basic comment forms. Is it possible to link the Nickname they have chosen to the website they have inputed were it a valid website url? Thank you in advance.
Regards,
Nick