Author Gravatar For WordPress
I was looking to show gravatar (photos) on the author’s post on a WordPress website. I looked around, but most WP plugins are designed to show gravatar on the comments, not on the actual post.
There are hacks around for this, but they seemed too complicated for this simple task.
One had the promise, but strangely ended up not working.
In the end, I’ve had enough, and delved into WP’s source code. Lo and behold, it’s actually pretty easy. Just insert this in main template’s code, and voila — author’s photo.
<img src="http://www.gravatar.com/avatar.php?gravatar_id=<?php global $authordata; echo md5($authordata->user_email); ?>" />
Hope it helps someone.
(credit to tyr for the idea)

September 13th, 2006 03:49
ntar munculnya di sebelah mana ya mas? patut dicoba sih
September 13th, 2006 05:10
Maksudnya piye toh? Lha yang nulis kan cuma kita doang. Kecuali kalo agregasi atau web yang ditulis oleh banyak orang
September 14th, 2006 00:01
firman & qzoners — contohnya bisa dilihat disini
September 14th, 2006 01:31
bisa dicoba tuh di planet terasi. minta sama ronny, gih…
September 30th, 2006 06:44
btw; to show gravatar in comments without installing the gravatar plugin, just paste this (single) line into comments.php :
.
<div style="float: right;"><img src="http://www.gravatar.com/avatar.php?gravatar_id=<?php global $comment; echo md5($comment->comment_author_email); ?>" /></div>.
September 30th, 2007 21:41
Hey, much easier than I thought. Thanks!