Now that Gravatar support is part of the WordPress core adding them into your WordPress theme is easy. Adding them to your comments has been documented. How about adding them to your post titles to highlight the comment author? Within the loop? That’s fairly easy too. Here’s the code:
<?php echo get_avatar( get_the_author_email(), '80' ); ?>
Pretty simple, huh? get_the_author_email outputs the post author’s email and the “80″ is the size of the avatar image in pixels (you can change that). How this will look depends on how you use it; where you put it in the theme (it has to be in the loop!) and how you style it.
Want an example? I had to figure this out for an upcoming project so…
Look at that frighteningly intense young man there in black and white. Good grief, it’s me! The author of the post! The code, it works! It works!
Ahem. Excuse me. I get a little excited about these things. Good luck using it in your own theme!
By the way, did you know WordPress has built in email protection from spam bots (read Disguising Your Email)? I didn’t. Neat.
Pingback: 40+ Most Wanted Wordpress Tricks and Hacks | Quest For News, A TUTORIAL Base
Pingback: | Mellowish
Pingback: 40+ Most Wanted Wordpress Tricks and Hacks | Overflowed Media
Pingback: 40+最值得应用的WordPress技巧和工具 « 爱牛牛玩具总动员
Pingback: Top 40+ most wanted wordpress tips and tricks | Tomislav Mihajlovic (Toma) - Toma2U.com
Pingback: 草根评论 » 40+ Wordpress中的Tricks and Hacks技术
Pingback: Unlimited New Useful Wordpress Tips,Tricks & Hacks - Themeflash : One Stop For All Your Web Resources
Pingback: D.K推荐41个最有用的WordPress技巧 | iOver
Pingback: US Want - Your Blogs, Social Network, Search Engine for Drivers, UserGuide, Vids, Images, Tutorials
Pingback: 10 Ways to Customize and Personalize your Wordpress Blog | Pro Blog Design
Pingback: wordpress düzenleme ve kişiselleştirme yolları « Bay Bedava – Netten Başlıklar
Pingback: wordpress düzenleme ve kişiselleştirme yolları | Teknoloji Sokağı
this tutorial simple but very useful
thanks
5 stars
Pingback: 40+ Most Wanted Wordpress Tricks and Hacks | My Tech way
Thank you very much for this useful information.
I created a plugin recently to display “about the author” box above the posts and I used gravatar in it.
Thanks again and take a look at the plugin.
Pingback: 41 Most Wanted Wordpress Tricks and Hacks | eBookTM | Download ebook, Jetaudio skin, Games
Pingback: Most Wanted 40+ Tips and Hacks For Wordpress | oOrch Blog
Pingback: 40+ Most Wanted Wordpress Tricks and Hacks « Los temas del Pelado
ian — but where do I put my email so gravatar can identify the user?
Pingback: 40 consejos y trucos para Wordpress « Los temas del Pelado
Thanks, Jason.
Pingback: 40+ Most Wanted Wordpress Tricks and Hacks | 9Tricks.Com - Tips - Tricks - Tutorials
Pingback: 40+ Most Wanted Wordpress Tricks and Hacks - Wordpress Releases
Pingback: 10 Ways to Customize and Personalize your Wordpress Blog | SEO & Web Design
Pingback: 10 Ways to Customize and Personalize your Wordpress Blog | SEO & Web Design
Pingback: NamrouD | Upgrade Your Mind ! » 40+ Most Wanted Wordpress Tricks and Hacks
Hi i just put the code into the single.php archive from my theme. I put it in the code of the title at the beggining of the title and reduced the size from 80 to 50 and now it looks great.
A great simple code!!
Thanks
Very cool! Implemented it in about 2 seconds, using a float right. Thanks!
Pingback: 40+ Most Wanted Wordpress Tricks and Hacks | GREYBLOGS
There’s already quite a few plugins that do the same thing. But this is a nice tip. You’ll get a nice effect very easily. Thanks for sharing!
Pingback: Online live » Blog Archive » 40+ Most Wanted Wordpress Tricks and Hacks
Pingback: 30 Amazing Wordpress Hacks, Tricks, Scripts « Desi Garmi: Malayalam Masti…!
Pingback: Wordpress Hacks | DaveDesign.us
Hello, just want to know where to put that code ….I do not know what’s loop…
Pingback: FAQPAL Blog
Pingback: Mas de 40 Trucos para tu Wordpress | trukos!
thanks… i will apply that.. i’ve been looking for some fine tips and here’s the best one..
Pingback: BLOG { jörg steinhauer } » Gods of GFX #3 – Web
Pingback: 35 WordPress Tips and Tricks You Must Know | SmashingHub
Pingback: 35 WordPress Tips and Tricks You Must Know « Design Works
Pingback: 23 articles and resources to improve your Wordpress life! | JortK.nl
Pingback: 30个优秀的Wordpress技巧为您打造强大的博客 – 【大嘴的窝棚】
Pingback: 40+ Most Wanted Wordpress Tricks and Hacks « Agencija 027 S.N.O.B.
i just know how to put the code, usually i just use a ready themes for gravatar
thanks
Excellent! I wanted the pic in the bottom under the content (which this works great for, by the way), but now I think I might like to have it up there at the top. Thanks for the help.
Pingback: 30 Wordpress Hacks You Gotta Have | Altered Advice
Pingback: 40+最值得应用的WordPress技巧和工具 | 屁民球球的设计小屋
Pingback: 41个最有用的WordPress技巧 | 心绪视觉团队
Thats a very good collection to bookmark and look at various occasions. Thanks!
Thanks for good information. But can u tell, where this code I must put?
P.S. I’ve click to twitter))
Thanks for good information. But can u tell, where this code I must put?
In a comments loop.
Pingback: Wordpress Hacks « reeboot strategy
Pingback: The Ultimate Guide To Wordpress Hacks And Customizations | Web design news and tutorials
Pingback: Wordpress Hacks And Customizations « moemir
Pingback: | Technoweblog
Pingback: Wordpress Hacks e Customizations! | sinergie.::.websolution | il blog
Pingback: 40+ Most Wanted Wordpress Tricks and Hacks « Tips for online tech users, Designers, Blogger, Learners…
Pingback: 40+ Most Wanted Wordpress Tricks and Hacks | Tut7
Hi Ian,
I am new to Gravatars. I want to add Gravatars to my blog so that at the bottom of each blog post, the post author’s Gravatar will be displayed along with their description and website. Is there a widget for that? Here is an example of what I am looking for:
http://www.detroitmommies.com/2010/06/rhpl-evening-family-storytime/
If you look at this post, at the bottom you will see the Autors Gravatar, a description of the author and a link to their website. Is there a plug-in or a widget that does this? I have the same theme blog which is the lifestyle theme.
Thanks,
Nice info
i need this information to add my avatar as author of me.