For people who comment on other blogs:-
Its a simple thing for some advance internet users, but I am sure that most of the people are not yet sure about how to get a pic or gravatar next to their comments on some WordPress(which allows showing gravatar ofcourse!) blogs.
Here is the simplest way, which will take just 2 or 3 minutes(depending on your internet connection speed 🙂 ).
Goto Gravatar.com(acquired by automattic), Click on SignUp.
You will just need a valid email ID, as you will receive a confirmation email including a link that will activate your account and allow you to set your password. After activating your account, login and goto “Add an Image“, now you will be presented with some options to upload a photo to your account. Upload an image that you want to show beside your comment. People who want to create their brand awareness, will use their website logo. And some others who want to show their photo beside the comment can upload their photo.
You can even use the same account(therefore the same images) to multiple email IDs. Just click on “Add an Email Address” link and you can add another email ID.
Now while commenting on blogs which show gravatar next to the comments, use the email ID that you used to signup with Gravatar.com. You can use any of the email ID’s that you have added to your Gravatar.com account, this will automatically show your uploaded image beside your comments. WordPress will automatically retrieve the photo and show it on the blog.
For blog owners:-
If your theme does not have gravatar enabled by default, then here is a simple trick using which you can integrate it. Add below code in comment.php file
<?php if(function_exists('get_avatar')) { echo get_avatar($comment, '50'); } ?>
to show the gravatar wherever you want to show them. You can use styling by adding some css class.
Plugin for blog owners:-
If you don’t want to go through the hurdle, just use WP-Gravatar plugin upload and activate it and you will be ready with the gravatar enabled comment section instantly 🙂
There are many other services and methods to show gravatar, but this one is the best and the widely used one.
Please share your knowledge in the comment section. Do you know any tips, tricks, hacks or anything regarding gravatar ?