WordPress.org

Ready to get started?Download WordPress

Forums

Avatars/Gravatars not appearing (4 posts)

  1. intcon
    Member
    Posted 1 year ago #

    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

  2. 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 );

  3. intcon
    Member
    Posted 1 year ago #

    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!!!!

  4. Sorry missing end parenthesis.

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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.