WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] 2.5 Gravatar Help: Image doesn't show. (11 posts)

  1. Keilya
    Member
    Posted 6 years ago #

    Hello!

    First of all, thanks for all the hard work into 2.5. It looks great!

    I'm trying to implement Gravatars on my blog and this is snippet I've inserted into comments.php according to http://codex.wordpress.org/Using_Gravatars

    <?php
    echo get_avatar( $email, $size = '80', $default = '' );
    ?>

    The problem is, the default "no gravatar" avatar (eg. http://akichigo.org/?p=1540#comment-232409) keeps showing up despite me having the email address assigned with an avatar. I've tried this with 3 email addresses I have and the outcome is still a boo boo.

    I've double checked with the gravatar side. Everything's working fine on that end. Having my gravatar showing up alongside this post is proof.

    So, is my snippet wrong? Or where did I go wrong? @.@

    Any help would be greatly appreciated!

  2. da3rX
    Member
    Posted 6 years ago #

    <?php echo get_avatar( $comment, $size = '80' ); ?>

  3. Keilya
    Member
    Posted 6 years ago #

    OHMYGOSH! It works! THANK YOU!! ^__^

  4. Jeff1701
    Member
    Posted 6 years ago #

    Yes, it works! Thanks!

  5. alexleonard
    Member
    Posted 6 years ago #

    Codex has been updated with this information.

  6. micasuh
    Member
    Posted 6 years ago #

    Is there a specific place inside the comments.php that this tag needs to reside? When I randomly stick the tag in there, I do not see any avatar. Not only that, but how does this tag know to reference gravatar.com? Is that built into WordPress' code? Thanks!

  7. micasuh
    Member
    Posted 6 years ago #

    It seems the answers to my questions have appeared to me already. The gravatars have finally showed up, so I'm guessing WordPress does in fact link to gravatar.com's website to reference the avatar.

    As for code placement, I still have no idea if there's a correct or non correct place to put it, but I tried to put it near the php code which states the commenter user id. After doing that, it appears to be working.

  8. Nicki Faulk
    Member
    Posted 6 years ago #

    Thank you, da3rX. That was exactly what I was looking for! :)

  9. BioTecK
    Member
    Posted 6 years ago #

    Greaat!! Had the same problem and now it's solved!!
    Thnx da3rX!

  10. stalyn
    Member
    Posted 5 years ago #

    also <div class="author"> <?php echo get_avatar( $comment, 32 ); ?>

    work fine.

  11. stalyn
    Member
    Posted 5 years ago #

    <div class="author"> <?php echo get_avatar( $comment, 32 ); ?>

    work fie also.

Topic Closed

This topic has been closed to new replies.

About this Topic