Add author’s gravatar in wordpress posts

January 18, 2009 · Print This Article

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 article, we’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');

Your choice for site templates and wordpress themes


One Response to “Add author’s gravatar in wordpress posts”

  1. jake on October 29th, 2010 6:23 pm


    excelent post, keep it coming…

Got something to say?

You must be logged in to post a comment.