Title: comment_author_link() problem
Last modified: August 19, 2016

---

# comment_author_link() problem

 *  Resolved [john-hoare](https://wordpress.org/support/users/john-hoare/)
 * (@john-hoare)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/comment_author_link-problem/)
 * Hi everyone,
 * When using the above function, it spits out the author and URL entered for unregistered
   users fine. But for registered users, it doesn’t return the Website URL entered
   in their profile – just the comment author name, unlinked.
 * How can I get it to do so? I’ve tried everything I can think of doing, but nothing
   seems to work. Any help you could offer would be gratefully received!

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [john-hoare](https://wordpress.org/support/users/john-hoare/)
 * (@john-hoare)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/comment_author_link-problem/#post-1336526)
 * Well, for what it’s worth, I did this:
 * <?php if ($comment->user_id != 0) { $user_info = get_userdata($comment->user_id);?
   ><a href="<?php echo($user_info->user_url);?>"><?php comment_author() ?></a><?
   php } else { comment_author_link(); } ?>
 * This spits out the user-entered URL if the commenter isn’t registered – and if
   the user is registered, pulls the website URL from their profile instead.
 * Shouldn’t the system really be doing this automatically, though?
 *  Thread Starter [john-hoare](https://wordpress.org/support/users/john-hoare/)
 * (@john-hoare)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/comment_author_link-problem/#post-1336573)
 * Resolved, then. Slightly disappointed I never got an answer to my query.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘comment_author_link() problem’ is closed to new replies.

 * 2 replies
 * 1 participant
 * Last reply from: [john-hoare](https://wordpress.org/support/users/john-hoare/)
 * Last activity: [16 years, 3 months ago](https://wordpress.org/support/topic/comment_author_link-problem/#post-1336573)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
