• Resolved john-hoare

    (@john-hoare)


    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

    (@john-hoare)

    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

    (@john-hoare)

    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.