Gravatars
Posted on June 11, 2009
Filed Under Blogging | Leave a Comment
Wow, I never knew about Gravatars until just now. Everyone needs to go to Gravatar.com and register an avatar that can be used across the web on many websites (including this one). The avatar is associated with your email address and if a website uses Gravatar it just checks to see if you have one setup on Gravatar.com. If you look at comments on this site you will now see avatars. This is a really amazing idea!
Now if you have a wordpress blog and you want to incorporate Gravatars into your template, I suggest you use this line of code in your comment template.
<?php echo get_avatar( $id_or_email, $size = '96', $default = '<path_to_url>' ); ?>
Replace $id_or_email with $comment (this is what I used) or with get_the_author_id() (it varies from theme to theme), replace XX with the size you want the images (I use 50 pixels), and replace ‘
Hope this was educational, and remember to sign up for a Gravatar!
Tags: avatar, webaccount