What about displaying the author picture in your posts? Sure, you can use a well known hack to display a picture located in your theme directory, but what about using Gravatar? In this recipe, I’ll show you how you can easily get the post author gravatar and display it.


















20 Responses
Easy
already knew it.
Nice hack though
Cool idea! Thanks.
Hey Jean-Baptiste,
How about one master code combining a few things you have done. Right now I can pull in author pictures from four places: the user-photo plugin, gravatars, twitter and avatars. And lets say that’s the order I prefer them in.
So have WP check for user-photo first. If that’s not there, then try gravatar. If that’s not there try twitter, etc.
That’s a good idea! I should write that code and post it on CatsWhoCode.com or on a blog where I do some guest-blogging
Thanks man, it`s very nice
I`ve made this change in my blog
Simple and nice.
Thanks for the great tip. I have already put it to use on the site I am currently developing.
Hey Jean-Baptiste, I’m not supposing that you took this tip from wpengineer.com, which we published some days before.
http://wpengineer.com/identify-authors-gravatars/
If so, we would appreciate if you can give us the credit for it.
Thanks
@Alex: You’re right, and I’m sorry to have forgotten your credit. I always credits people here on WpRecipes, but this time I have forgotten. Please accept my apologies for this! Credits and link just have been added.
No problem at all Jean-Baptiste. That can happen, nobody is perfect. Thanks for the credit and we are glad your reader like it.
Nice tip, I already used it along author description.
Hie. The ‘96′ refers to the size of the gravatar, is it?
@Nurlea: Yes
Thanx, It’s so easy
thanks for share!
Very Nice…., thanks for sharing in fact i am looking for this
Trackbacks: