Code Comments

Gravatars, finally.

With some time to spare yesterday I finally got round to implementing Gravatars on the site here, so that folk with a “globally recognised avatar” will see their avatar appear beside their comments.

In the event it was a piece of cake – there’s a WordPress plugin that you install, and then all that’s needed is to stick a line beside where user comments go in the comments.php file of your template.

<img src="<?php gravatar('R', 45) ?>" alt="gravatar" class="alignleft" />

I used the line of code above to insert a 45 pixel icon beside the <cite> tag in the template.

Continue Reading