Code To Add Gravatar For The Post Author In WordPress Blog

Posted by


Upto now we gravatar are displaying in the comment to identify the comment author…but now to indentofy the post author we can also use gravatar. For that please use this code into your wordpress blog:

<?php echo get_avatar( get_the_author_email(), ’70’ ); ?>

get_the_author_email outputs the post author’s email and the “70” is the size of the avatar image in pixels. It depends on how you use it where you put it in the theme and how you style it.


Shane G.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.