WordPress.org

Ready to get started?Download WordPress

Forums

Co-Authors Plus
[resolved] Compatible with Gravatar? (7 posts)

  1. mcheater
    Member
    Posted 3 years 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 ) ); ?>

    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' )

  2. Jaqueline
    Member
    Posted 2 years ago #

    Did you have success with it? I am trying, but it shows only the same avatar, for both authors...

    thanks!!

  3. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 2 years ago #

    Can you try passing the user ID instead?

  4. Jaqueline
    Member
    Posted 2 years ago #

    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:

    http://pastebin.com/JvQeCF6v

    Thanks for any help!

  5. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 2 years ago #

    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 :)

  6. Jaqueline
    Member
    Posted 2 years ago #

    Daniel, many thanks! No, I didnĀ“t figure it out before! ;) Now, with your code, it is working perfectly!

    Many thanks!

  7. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 2 years ago #

    You're welcome :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic