"If you can get along with everyone and everyone loves you, then you don't stand for much. A person who stands his ground for his principles and won't compromise his integrity is not loved by everyone."
- Larry Winget
In my tutorial on how to display twitter status messages in WordPress, I used my own avatar picture beside the speech bubble. I have not found a way to retrieve my Twitter avatar from Twitter. Hopefully, I will figure out how to do it in the near future.
An alternative way to organize my avatars would be to use Gravatar. Gravatar allows you to display your avatar through a simple URL.
The Normal Avatar Code
1 | <div id="twitter_photo"><img src="%3C?php%20echo%20bloginfo%28%27template_directory%27%29;%20?%3E/images/icon-twitter.jpg" alt="" width="73" height="73" /></div> |
The Gravatar Avatar Code
1 | <div id="twitter_photo"><img src="http://www.gravatar.com/avatar.php?gravatar_id=%3C?php%20echo%20md5%28" yourgravatar@email.com="" );="" ?="" />" width="73" height="73" alt="" /></div> |
You should replace “your...@email.com” with the email address of your Gravatar avatar email address. With Gravatar, I no longer need to upload and manually change the code whenever I update my avatar. Now, I only need to edit it from Gravatar and all my sites will display the updated avatar.
1 Trackback On “Display Gravatar Avatars on Your Web Site”
Post a Comment