Our site (http://pseweb.ca) has many multi-author posts and we were leveraging both Co-Authors Plus as well as Gravatar to show the gravatar of the first author at the top of each post (hadn’t figured out how to show the avatars of multiple authors yet … ).
Recently, the site started always showing my personal avatar rather than the (co)authors. I checked that the correct users are assigned as (co)authors on the posts.
This is the code that we have pulling in the gravatar:
<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 46 ) ); ?>
I looked in the source of the RSS feed for the content type (http://pseweb.ca/presentations/feed/) and saw that I was the “Creator” for all the posts – so I’m thinking that my template is pulling the creator’s email address, rather than the (co)authors email address (Gravatar is based on email address).
I tried changing get_the_author_meta to get_the_coauthor_meta, but it didn’t work (sounds like this only works with WordPress 2.8).
Some other notes:
We recently upgraded WordPress to 3.1.2 – we also recently upgraded the Co-Authors Plugin.
I am working a custom post type (presentations).
Many of the “presentations” on the site had been assigned co-authors who were not me, but something caused many of them to switch from their assigned authors to me. I went in and re-assigned the correct authors but this didn’t fix the problem – it’s still pulling my info, rather than the assigned coauthors.
If I use the_author() instead of the_coauthor(), I receive my information – even when I am not one of the coauthors. It’s like my site is showing me the Co-Authors field instead of Author, but it is putting the creator of the post as the_author.
I’m not attached to either gravatar or co-authors plus. My goal is to have multi-author posts that show avatar/display pics for all authors.
Any help would be very appreciated!
The docs are a little outdated.
get_the_coauthor_metareturns an array of the requested values for the coauthors, so calling
get_the_author_meta( 'user_email' )would return something like:
 => 'email@example.com',
 => 'firstname.lastname@example.org'
where 123 and 456 are user ids.
You can also just do a custom loop, using
foreach loop. See http://wordpress.org/extend/plugins/co-authors-plus/other_notes/
- The topic ‘Avatars on a blog with multiple authors per post’ is closed to new replies.