1 Step Gravatars on your WordPress Blog
Get Gravatars on your WordPress Blog in 1 step
No plugin required! Just one copy/paste in your comments.php file will make gravatars miraculously show up ( for commenters that have gravatar accounts) 1 step:
Directly before: <?php comment_text() ?>
paste:
<?php
if ( !empty( $comment->comment_author_email ) ) {
$md5 = md5( $comment->comment_author_email );
$default = urlencode( 'http://use.perl.org/images/pix.gif' );
echo "<img style='float: right; margin-left: 10px;' src='http://www.gravatar.com/avatar.php?gravatar_id=$md5&size=60&default=$default' alt='' />";
}
?>
SAVE changes.
Voila! You’re done. Easy as pie.
Let me know when you’ve done it and I will head over and test it.







Nice and easy! :-) Thanks for posting this, I’ll have to add this into my blog.
I added it on Tumbled Words, it was a cinch, and it worked, one of your old comments showed your face! Adding it to the rest, thank you, Damien! Now to decide on a Gravatar image, that is the hard part for me.
Marcia’s last blog post..Gravatars, Anonymity, and Life