Support » Fixing WordPress » Avatars/Gravatars not appearing

  • Hello….I’m trying to get gravatars to show on my blog. I have it marked in Settings to show gravatar, but nothing. I have this code

    <div class="comment-author vcard">
    <?php
    $avatar_size = 68;
    if ( '0' != $comment>comment_parent )
    $avatar_size = 39;
    
    echo get_avatar( $comment, $avatar_size );

    in my functions.php file, which is the only place I can find anything about an avatar.

    WP says to use this code

    <?php
       echo get_avatar( $id_or_email, $size = '96', $default = '<path_to_url>' );
       ?>

    but where would I add it at? And would I then remove the above vcard code?

    thanks!

    carrie

Viewing 3 replies - 1 through 3 (of 3 total)
  • You need to pass the either the user id or the comment authors email address to get_avatar

    echo get_avatar( get_comment_author_email( get_comment_ID(), $avatar_size );

    augh…that got me one of these..

    Parse error: syntax error, unexpected ‘;’ in /home/elysseq/public_html/wp-content/themes/monicaburnsv2/functions.php on line 378

    then when i switched it back, it said the same thing!

    help!!!!

    Sorry missing end parenthesis.

    echo get_avatar( get_comment_author_email( get_comment_ID(), $avatar_size ) );

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Avatars/Gravatars not appearing’ is closed to new replies.