Support » Themes and Templates » How to add subscribers photo to their comments

  • mzeecedric


    I would like to add Avatars (Similar to Gravatar) to the comments of subcribers and authors. To add a picture to the posts I simply use the Template Tag get_the_author_ID() in combination with Cimy User Extra Fields Plugin. I can’t figure a possibility to get the comments author (profile) ID within a comment. I think I would need as get_the_comment_author_ID (). I’m quite a php and template newbie so I hope I’m just missing some idea how to get this done.

    This is the code-snippet I use to add a profile picture within the post:

    $value = get_cimyFieldValue(get_the_author_ID(), 'PHOTO');
    if ($value == NULL) {
    $value = '...default.png';
    } ?>
    <img src="<?php echo $value ?>" title="<?php the_author() ?>" />

  • The topic ‘How to add subscribers photo to their comments’ is closed to new replies.