WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Gravatar not showing on Author Profile page (8 posts)

  1. sharecommons
    Member
    Posted 3 years ago #

    Good day guys,

    I'm using Gravatar on my blog and it is kind of funny that Gravatar images are showing on Posts (Single pages) but not showing up on Author Profiles.
    Please see this link to understand what I'm saying:
    http://sharecommons.com/author/pangel/
    On this page, the gravatar images don't show up. But if you click on any of pangel's articles, you will see her gravatar on her posts. The only difference in the code of gravatar is that on SINGLE post pages, the size is set to 63. But on profile, the size of the gravater is set to 100. As I look at the codes, both codes look exactly same (except the size):

    <?php echo get_avatar( get_the_author_email(), '63' ); ?>
    <?php echo get_avatar( get_the_author_email(), '100' ); ?>

    I'm unable to understand what am I doing wrong. Also, if you look the source code on client side, you will find the different MD5 for the same author.

    Please suggest what can I do to fix this issue and display gravatar images on Author profile pages.

    Many thanks to anyone who can help.
    Regards.

  2. sharecommons
    Member
    Posted 3 years ago #

    Can anyone give me a direction on what to do in this situation? I really need some direction to move on. Would appreciate any help you guys can provide.

    Regards.

  3. Rev. Voodoo
    Volunteer Moderator
    Posted 3 years ago #

    Thinking out loud here, as I'm not totally sure,

    get_the_author_meta(‘user_email’);

    isn't the above preferred over get_the_author_email(),

    not sure if that would make a difference?

  4. sharecommons
    Member
    Posted 3 years ago #

    Hey there Rev,

    Thank you for the help. I tried that but unfortunately it didn't work.
    Searching through WP Documentation now ..

    Regards.

  5. Rev. Voodoo
    Volunteer Moderator
    Posted 3 years ago #

    More messing around...is it because it's outside the loop maybe?

    <?php
    $thisauthor = get_userdata(intval($author));
    ?>
    <?php if(function_exists('get_avatar')) { echo get_avatar($thisauthor->user_email, 100, "" ); } ?> </div>
  6. sharecommons
    Member
    Posted 3 years ago #

    Man, you just gave me a direction :)
    This worked:

    <?php echo get_avatar( $curauth->user_email, '100' ); ?>

    Appreciate your help a lot :)

  7. Rev. Voodoo
    Volunteer Moderator
    Posted 3 years ago #

    Nice one! Glad to help.....even if it's a nudge!

  8. nandanjha
    Member
    Posted 2 years ago #

    I am having almost the same problem. In my case this is limited to just one user for whom the gravatar is not showing up on the author's page.

    http://www.ghumakkar.com/author/abhinav/

    While for any of Abhinav's post, you can see the gravatar.

    Also, a similar author page for anyone else shows the gravatar.

    I am using <?php echo get_avatar( $curauth->user_email, '100' ); ?>

Topic Closed

This topic has been closed to new replies.

About this Topic