DISCLAIMER: this post is older than one year and may not be up to date with latest WordPress version.

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.

To achieve this recipe, simply paste the following code on your single.php file, where you want the gravatar to be displayed:

	$author_email = get_the_author_email();
	echo get_avatar($author_email, '96');

That’s easy as that!

Credits goes to WpEngineer for this very nice tip!

One Comment

  1. Great help in such a simple way //

Leave a Comment

Your email address will not be published. Required fields are marked *