WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just want to add author gravatar near the name of the author. I know that I have to add something in the single.php file, but what to add? Thanks!

share|improve this question
up vote 3 down vote accepted

If you're in the Loop:

echo get_avatar( get_the_author_meta('ID') );

share|improve this answer
It worked just fine! – user385917 Aug 10 '11 at 17:20

Plenty of info on WP Codex on Gravatar's.

use: get_avatar( "id of author" );

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.