WordPress.org

Ready to get started?Download WordPress

Forums

How to add subscribers photo to their comments (1 post)

  1. mzeecedric
    Member
    Posted 6 years ago #

    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 s.th. 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:

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

Topic Closed

This topic has been closed to new replies.

About this Topic