• Resolved sharecommons

    (@sharecommons)


    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:
    https://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.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter sharecommons

    (@sharecommons)

    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.

    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?

    Thread Starter sharecommons

    (@sharecommons)

    Hey there Rev,

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

    Regards.

    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>
    Thread Starter sharecommons

    (@sharecommons)

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

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

    Appreciate your help a lot ??

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

    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.

    https://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' ); ?>

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Gravatar not showing on Author Profile page’ is closed to new replies.