Support » Plugins and Hacks » Co-Authors Plus » [Resolved] Compatible with Gravatar?
5 years, 6 months ago
We have been using Gravatar to pull in author photos with posts: <?php echo get_avatar( get_the_coauthor_meta( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 46 ) ); ?>
<?php echo get_avatar( get_the_coauthor_meta( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 46 ) ); ?>
Most of our posts were created by me, but I changed the authors to other users.
We used to have Gravatar and coauthors plus working together nicely, but today all the Gravatars started displaying as me rather than the coauthors.
I tried & did not have success with: get_avatar( get_the_coauthor_meta( ‘user_email’ )
5 years, 1 month ago
Did you have success with it? I am trying, but it shows only the same avatar, for both authors…
Can you try passing the user ID instead?
Daniel, thanks for the answer! No, unfortunatelly nothing changes. I was able to make it show both bios, but together with the bios, it shows only the photo of the “main” author.
You can see the print screen here: http://www.bloguissima.com/user.PNG
This is the code:
Thanks for any help!
Sorry for the late reply, I’ve been traveling.
If you haven’t figured it out already, you have a minor mistake in your code. Specifically, this snippet:
get_avatar( get_the_author_meta( 'user_email' ), '57' );
should be something like this:
get_avatar( $userdata->user_email, '57' );
If you do that, it should pull the avatars just fine 🙂
Daniel, many thanks! No, I didn´t figure it out before! 😉 Now, with your code, it is working perfectly!
You’re welcome 🙂