Re: Show (gr)avatar on frontpage
Of course you can do it, bbPress can do almost anything – as long as you code it
Showing the gravatar is the easy part, the code to fetch the latest poster and their email address is the tricky part. How’s your mysql?
Showing a gravatar for any email address is as simple as:
<img src="<?php echo "http://www.gravatar.com/avatar.php?gravatar_id=".md5($user->user_email); ?>" >
The mysql code for the email of the last poster is going to need a left join of the users table against the post table and more than I am willing to do right now. I suppose I could be lazy and use
get_latest_posts(1, 1) to fetch the entire info the last post and grab the email address from there.