Support » Plugin: Co-Authors Plus » Featured image (instead of gravatar)

  • Resolved notkristina


    Guest authors’ featured images aren’t displaying on my site, only gravatars.

    Weirder still, whenever I try to display a guest author’s info elsewhere on the site (specifically in some widgets I’m building), it isn’t even pulling the gravatar—it’s automatically resorting to the not-pictured default image.

    Has anyone had either or both of these problems before? I would love to be able to get the correct pictures to show up.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Daniel Bachhuber


    What code are you using to display the guest author’s avatar? You’ll need to be using get_avatar() with their email address, and then the guest author needs to have an email address associated with it.

    I was foolishly using the user ID instead of the email, so thanks—that gets me the gravatar. Any ideas about how to get the guest author’s featured image instead?

    Plugin Author Daniel Bachhuber


    Does your guest author have an assigned email address?

    Yes. I’ve now bypassed this problem by pulling the featured image directly instead of the avatar, since I don’t want to use the gravatar ever. In case it helps anyone else, this is what I’m using:

    //ONLY show an image if there IS a featured image.
    if ( has_post_thumbnail( get_the_author_meta('ID') ) ){
     <div class="avatar" style="float:left; margin-right: 10px"><?php echo get_the_post_thumbnail( get_the_author_meta('ID'),array(90,90) ); ?> </div>
    <?php  } ?>
    Plugin Author Daniel Bachhuber


    Thanks, notkristina. That seems like a reasonable solution for now. I’ll see if we can come up with something better in the future.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Featured image (instead of gravatar)’ is closed to new replies.