» Blogging » Add Author’s Gravatars to Posts in WordPress

Add Author’s Gravatars to Posts in WordPress

Spread the love

Adding Gravatar to your blog, makes your blog’s comments look more attractive. That’s why it have been incorporated in the WordPress core.

Now comes the idea of adding your gravatar to your post on WordPress. This can be pretty useful in blogs with multiple authors, so that readers can quickly identify, who wrote this post.

And adding this feature is real easy. Just add this code in your single.php –

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

You have to add this, where you want to display the Author’s gravatar. In this code “80″ is the size of the gravatar, you can change it to any value you want.

Pretty simple!! huh :)

Spread the love

Leave a Comment

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

Scroll to Top