Forums

Gravatars in Wordpress 2.5 With Brian's Threaded Comments Not Working (4 posts)

  1. tariqbamadhaj
    Member
    Posted 1 year ago #

    I just upgraded to Wordpress 2.5 and would like to use the Gravatars that is built-in.

    I am using Brian's Threaded Comments and I placed this line of code

    <div style="float: right; margin: 3px;"><?php echo get_avatar( $comment, $size = '32' ); ?></div>

    after

    <div id="div-comment-<?php echo $c->comment_ID ?>" class='comment<?php echo $odd?>'>

    and before

    <a name='comment-<?php echo $c->comment_ID ?>' id='comment-<?php echo $c->comment_ID ?>'></a>

    The thing is, I get the default image (the one with the gray icon and an outline) in all the comments including mine. I am sure my gravatar is working because when I go into the administration panel to view comments, I do see my gravatar.

    I have tried these solutions:
    http://wordpress.org/support/topic/164383?replies=4

    but they do not work for me. What am I doing wrong? Can anyone help me out?

  2. rhyswynne
    Member
    Posted 1 year ago #

    Close. The clues in the answer, had a similar problem :)

    Brian's threaded comments creates a temporary varable "$c", so using your code, replace $comment with $c, like this:-

    <div style="float: right; margin: 3px;"><?php echo get_avatar( $c, $size = '32' ); ?></div>

    That got it for me :)

  3. tariqbamadhaj
    Member
    Posted 1 year ago #

    Thanks rhyswynne. I will be sure to try it out when I get back later.

  4. mediaverse
    Member
    Posted 1 year ago #

    Can you please tell us which file to make this change in? Thx.

Topic Closed

This topic has been closed to new replies.

About this Topic