Avatars, or the well known Gravatars, are tiny images, often called your online identity, picture, badge, logo, or graphic image which represent you and/or your blog. Some use photographs of their face or body, or a body part like an eye, nose, or hand. Others use pictures of animals, flowers, scenics, or graphic images. Many professional bloggers use their logo.
This is about customization your template. Not all Wordpress template have user avatar shown on comments. But don’t worry, you can add it manually.
First go to dashboard or admin page, then go to design and theme editor. On your current theme add this CSS script on Stylesheet (style.css).
1 2 3 4 5 | .avatar { float: left; height: 40px; width: 40px; } |
Then update file. The second one, add this script to Comments (comments.php).
1 | <div class="avatar"><?php echo get_avatar( $comment, $size = "40" ); ?></div> |
Place it near:
1 | <?php comment_author_link() ?> |
Update file. The size of this example 40, you can change it and up to you. Just make it match with your theme. ^^
If you don’t have any Gravatar yet, sign up first on http://gravatar.com, set your default username and email for your comments.


One Comment Trackback URL | Comments RSS
August 3rd, 2008 at 11:37 pm
Brilliant!