Alright, this is kinda starting to get on my nerves... a little.  See, most of you that comment here don't have a gravatar.  You know what that does?  That makes me sad.  So here I'm going to tell you how you can easily get one set up for you in just 2 minutes or less.

What's a Gravatar?

For those of you that don't know, gravatars are basically the same as forum avatars - just for blog comments.  See, everytime you comment on a blog with gravatars coded into the blogs design template, your gravatar (specific to your email address you use to comment with) is posted along with your comment.  This gives you a little uniqueness about yourself and gives your comment some personality.

To get yourself set up with a gravatar, simply go to gravatar.com and sign up with the email address you will use when you comment on blog posts.  Once you confirm your email address, simply upload a picture to your account and whalla, you're done.  Now you have a gravatar associated with your comments.

Set Default Image

This section here is for theme designers that code gravatar usage into their wordpress themes.  You know when people don't have gravatars and when they post they have the bland default image instead?  Sure you could change the default image to one of 5 or so other default images via the WordPress Dashboard, but where's the uniqueness in that?  How about using one of your own images to be used as the default "no-image" gravatar?

Here's how to do it.  First, you'll need an image.  Make sure it's big enough, gravatars automatically scale down to appropriate size when displayed beside blog comments.  Once uploaded to your server, go into your comments.php file in your theme folder.  What you're looking for is the code that displays gravatars.  It should look something like:

<?php echo get_avatar( $comment, 32 ); ?>

Once you found it, this is all you have to do to enable your personalized default image to be the one gravatar uses when no image can be found:

<?php echo get_avatar( $comment, 48, 'http://www.forthelose.org/images/default-gravatar.gif'); ?>

Just make sure the url to the image is right, of course.

You may have noticed I was using this method here at ForTheLose.org for a while.  I recently changed it to one of WordPress's default images, as too many people didn't have a gravatar.  Because of that, the site's colors looked bland.  Now they look a little better, in my opinion.

Anyway, hope this article helped you out.  To you WordPress theme developers out there, now there's no more excuse on not having gravatars integrated in your themes.  I want to see colorful comments out ther,e people...

If you liked this post, stay updated. Follow me on Twitter or subscribe to our RSS Feed via email.

Post Tags: , ,

Related Posts

Like this post? Spread it!