• i wish to change the the link on people names from there URL to a internal link to show there user profile. But ive been having such trouble trudgin through the comment functions.

    basicly instead of link to there url i need it to go to

    https://eurocss.net/profile/?id=1

    with the id being there user id >_< any ideas?

Viewing 1 replies (of 1 total)
  • There’s no immediate way to do this, so you’d need to do a little work inside your comments.php.

    Something like this:
    <?php foreach ($comments as $comment) :
    $comment_author = get_comment_author();
    $comment_author_ID = $wpdb->get_var("SELECT ID from $wpdb->users WHERE user_email='$comment_author'");
    if (FALSE === $comment_author_ID) {
    // do something here if the commenter is unknown
    } ?>
    <li class="<?php echo $oddcomment; ?>" id="comment-<?php comment_ID() ?>">
    <cite><a href="https://eurocss.net/profile/?id=<?php echo $comment_author_ID; ?><?php comment_author(); ?></cite> Says:
    ...

    NOTE: that is completely untested.

Viewing 1 replies (of 1 total)
  • The topic ‘Changing the Comment Link’ is closed to new replies.