How to Activate the Author Bio and Gravatar
If you take a look at WP-Magazine Theme’s single post page, you’ll notice a handy little author bio box at the top of the article. You’ll also notice an author photo. If you’d like to activate this box on your own WP-Magazine driven site, it’s very simple.
Step 1 - On Your User Profile Page, Fill in the Author Bio Info
Just click the Users tab on your WordPress control panel, then click “Your Profile” from the sub-navigation bar. Look in the bottom left corner of the page, and fill in the field marked “About Yourself.” Then be sure to click the Update Profile button.
Step 2 - Create a Free Gravatar Account
The author photo is pulled from your Gravatar account. Also, be sure the email address you use for your Gravatar account is the same email address you use in your WordPress Author Profile. Note: the email addresses have to be EXACTLY the same, including the same case.
What If Your Gravatar Does Not Appear?
If your Gravatar does not appear, first, see Step 2 above. Second, you can try the direction in this comment.
How to Remove and/or Replace Your Gravatar
See this comment.

Comment by Steven Aitchison on 22 December 2007:
Hi Michael
Is there anyway to put the mybloglog avatars into this theme. I have tried calling it, but it does not work.
Regards
Steve
Comment by Dante on 23 December 2007:
How is the Gravatar “pulled” from my Gravatar account? I setup an account and nothing happened. I then found a Gravatar plugin that I installed and that has not helped either.
Comment by Dante on 23 December 2007:
Wow, that was cool.
Comment by Dante on 23 December 2007:
It’s working fine now. However, I do have another question. The post on the home page have a one sentence into, then when clicked it takes you to the actual blog post. How can I do that?
Comment by Bohol on 28 December 2007:
This is one of the most beautiful Wordpress themes that I’ve seen so far.
Comment by RB on 4 January 2008:
Gravatar test
Comment by Rod on 6 January 2008:
Gravatar test
Comment by Jay Thompson on 13 January 2008:
Just testing a comment. *Nice* looking theme!
Comment by Steve Outing on 14 January 2008:
I’m having the same problem as Dante, apparently; gravatars aren’t showing up. What was his solution?
Comment by Michael Pollock on 14 January 2008:
Steve: the email address much match *exactly* the email address used for the Gravatar account. No plugin necessary.
Comment by Scott Noon on 14 January 2008:
Michael, I have been having similar issues. I’ve checked and rechecked matching gravatar email addresses. I’ve checked to the that the “About” section has something in it. I’ve tried refreshing the page while standing on one leg. Nothing. I have 2-3 gravatars set up but nothing is getting pulled correctly.
Scott
Comment by Andrea on 14 January 2008:
testing my gravatar too
Comment by Michael Pollock on 14 January 2008:
try this scott:
open your Comments template and find this block of code:
<?phpif ( !empty( $comment->comment_author_email ) ) {
$md5 = md5( $comment->comment_author_email );
$default = urlencode( 'http://www.solostream.com/images/nophoto.gif' );
echo "<img class='comment-grav'
src='http://www.gravatar.com/avatar.php?gravatar_id=$md5&size=48& default=$default;&rating=PG'
alt='' />";
}
?>
Replace it with this:
<?phpif ( !empty( $comment->comment_author_email ) ) {
$md5 = md5( $comment->comment_author_email );
echo "<img class='comment-grav'
src='http://www.gravatar.com/avatar.php?gravatar_id=$md5&size=48&default=$default'
alt='' />";
}
?>
Then do the same thing in your Sidebar template.
Comment by David on 15 January 2008:
Hi Michael,
Thank you for the Gravatar instructions,they worked perfectly.
Comment by David on 16 January 2008:
Michael, I have been been working diligently with the WP-magazine theme since I purchased it approximately 2 weeks ago. I want to say that you have certainly empowered the individual and or business to really get up and running quickly. Thank you for creating such a great product at a price that is second to none. Also, your step by step instructions have proven invaluable and when needed, your prompt and professional technical support has been great and very quick.
Thanks again,
Best Regards,
-David
Comment by Scott Noon on 17 January 2008:
Michael,
For the small groups section of my church’s website, I opted to use your Index 5 template. The copy in the block is longer than the window space and it doesn’t seem to be excerpting properly.
Do you have any advice? See http://trinitymtjoy.org/SGM/ for insights. Thanks. I remain a huge fan of your template.
Scott
Comment by Scott Noon on 17 January 2008:
By the way, Firefox and IE7 give different results… IE7 “tucks in” the copy and Firefox just runs the copy down as far is it needs to go, over-writing the footers on the post boxes.
Scott
Comment by Dean on 18 January 2008:
Just purchases WP-Magazine, this is by far the best theme I have worked with. Micheal I can’t wait more themes that you will create.
Comment by Michael Pollock on 18 January 2008:
>>>>> For the small groups section of my church’s website, I opted to use your Index 5 template. The copy in the block is longer than the window space and it doesn’t seem to be excerpting properly.
>>>>> Do you have any advice? See http://trinitymtjoy.org/SGM/ for insights. Thanks. I remain a huge fan of your template
Scott:
you can do 1 of 2 things here.
1. you can use the Optional Excerpt field on your Write Post page to control the length of the excerpt.
or
2. you can increase the height of the entry area. to do so, follow these steps:
1. On your Wordpress control panel, click Presentation, then Theme Editor.
2. On the next page, you’ll see the Stylesheet template. Scroll nearly to the bottom and find this block of code:
.home-post-list-5 .entry {height: 140px;
padding:10px;
}
3. Just adjust the 140px to whatever height you prefer.
Comment by David on 18 January 2008:
Hi Michael,
I have a couple of cosmetic questions please.
I am just trying to locate the proper code so that I can make these final cosmetic changes..Thank you in advance for your assistance.
Q1.On my homepage I would like to change the Menu links that I have listed below to a new color.
Home – About – Contact Us – Sitemap – RSS to be a Green
and for the background that is now green to be yellow.
2.Which code do I need to change to make the Featured Articles row
the color Green instead of its current color of Black?
3.I would like to change the widgets title bar color to Green from the current Gray color for the widgets listed below.
Blogroll, Archives, Meta, Popular - Most Comments – Search - Tags -Archives, Recent Comments, and Polls.
4. I would like to change the text color for the Meta widget to yellow. At the moment the text cannot be seen.
Thank you very much Michael, I do appreciate it.
Comment by Kirtok on 20 January 2008:
testing the gravatar for the bio.
Comment by Deb on 25 January 2008:
Hi Michael,
Working with this theme — loveit! Am making headway but still am having some difficulties with a couple items. Have followed all the directions for rotating the featured articles, and the author/gravatar pic. Am having no luck. www.Fictionguru.com.
Thanks, Deb
Comment by JODANI on 25 January 2008:
testing the gravatar for the bio.
Comment by Mark on 27 January 2008:
Very cool feature.
Comment by David on 28 January 2008:
Hi Michael,
Can you please tell me how I can write a post and not have my gravatar show up every time under Recent Comments?
For example: When I am on WP-Magazine.com and I click on your name, it shows your gravatar and biographical information which is fine.
I just want the comment to be displayed under the recent comments section.
Thank you in advance.
-David
Comment by Steven Aitchison on 29 January 2008:
Hi Michael
Can you tell me how I drop the gravatar and put in the MyBlogLog avatar features. I would still like MyBlogLog to show the avatar of in the comments section. Thanks.
Comment by Mark @ TheLocoMono on 29 January 2008:
Very cool theme you got going on here, Michael. I am tempted to run home now and buy the licenses so I can use it NOW! Unfortuantely I will have to settle for testing your demo here at work to see if I am missing anything.
While I understand it works with the sidebar widget, what about plugins such as subscribe to comments or live preview or commentluv, etc… Are there restrictions to this?
Comment by Frank on 30 January 2008:
Testing the Gravatar plugin. Doesn’t seem to be working on my site..
Comment by Frank on 30 January 2008:
Got it working using the code you posted above for Scott. Thanks!
Comment by Will on 2 February 2008:
Can’t get the gravatar to work.
I signed up at gravatar and assigned a photo to the email address.
I also made sure the email address in my wordpress profile is the same one.
But the gravatar won’t show up in any of the posts.
Also, the link to “other posts by this author” doesn’t work.
Will
Comment by Will on 2 February 2008:
If I open my site with Internet Explorer the gravatar works.
If I open it with Firefox it doesn’t work.
Comment by Will Davidson on 2 February 2008:
The Gravatar feature suddenly started working with Firefox. Weird, not sure what I did.
Comment by Jeremiah on 3 February 2008:
How do I turn off gravitars completely? Most people posting have no Gravitar and the ugly blue gravitar shows up in the posts section of the sidebar. I want to remove the gravitar function completely.
Comment by Michael Pollock on 4 February 2008:
>>>>> Can you tell me how I drop the gravatar and put in the MyBlogLog avatar features. I would still like MyBlogLog to show the avatar of in the comments section.
Open your Comments template and find this code:
<?phpif ( !empty( $comment->comment_author_email ) ) {
$md5 = md5( $comment->comment_author_email );
$default = urlencode( 'http://www.solostream.com/images/nophoto.gif' );
echo "<img class='comment-grav'
src='http://www.gravatar.com/avatar.php?gravatar_id=$md5&size=48&default=$default'
alt='' />";
}
?>
Then delete it. That will remove the Gravatar, then I imagine you’ll need a plugin for the mybloglog avatar. You’ll probably need to place some code back into the template depending upon the plugin you use.
You’ll have to repeat these steps in Sidebar template.
Comment by Monica on 6 February 2008:
Gravatar test!
Comment by jamie on 7 February 2008:
@David.
I like your site, but tell me, how did you get the video into the ad spot on the top right?
Comment by InnovateOrDie on 8 February 2008:
Test me and my Gravatar
Comment by Vertigo on 11 February 2008:
Testing gravatar…
Nice looking template here
Comment by m.o.m. on 12 February 2008:
Nice Nice!
Comment by Results Radio Show on 13 February 2008:
Hey Guys,
I want to first say that I really love this theme.
I also wanted to remove the Gravatar information so I commented out the PHP code for Gravatar in the comments and sidebar files. Basically I replaced:
comment_author_email ) ) {
$md5 = md5( $comment->comment_author_email );
$default = urlencode( ‘http://www.solostream.com/images/nophoto.gif’ );
echo “”;
}
?>
With:
comment_author_email ) ) {
$md5 = md5( $comment->comment_author_email );
$default = urlencode( ‘http://www.solostream.com/images/nophoto.gif’ );
echo “”;
}
*/ ?>
It seemed to work fine on our site. Let me know if there’s a better way.
Comment by Atomic Popcorn on 14 February 2008:
How would I go about adding the “See All Posts by This Author” just before or after the “February 13th, 2008 • Related • Filed Under’ portion of a post on the single post page.
I feel that the author portion of the theme takes away from the article itself.
Thanks much !!
Comment by Marco Aurélio on 14 February 2008:
Something wrong on my website: my own gravatar never shows up.
Comment by Marco Aurélio on 14 February 2008:
Well, neither here. Does that have anything to do with the “will not be published” by the email field?
Comment by Frank V on 16 February 2008:
When I use the “Split Post With More Tag” the post doesn’t split onto multiple pages. Can someone tell me what I am doing wrong?
Comment by m.o.m. on 19 February 2008:
Marco Aurélio wrote “Something wrong on my website: my own gravatar never shows up.”
Same here.
Comment by Eve on 20 February 2008:
Gravatar test
Comment by Antonio on 22 February 2008:
Testing my gravatar!
Comment by Claude on 24 February 2008:
testing my gravatar,
Comment by Sandra on 25 February 2008:
testing my gravatar
Comment by Matt on 26 February 2008:
Excellent
Comment by Melissa Ulto on 4 March 2008:
testing my gravatar
Comment by Melissa Ulto on 4 March 2008:
testing gravatar 2
Comment by Ginger on 4 March 2008:
Testing
Comment by Iskwew on 6 March 2008:
If everyone else is testing their gravatars, I wanna do too!
:o)
Comment by mike on 6 March 2008:
testing
Comment by mike on 6 March 2008:
Does it take a while for the gravatar to pull?
Comment by Kenneth on 9 March 2008:
Is my old gravatar working?
Comment by Dori B on 10 March 2008:
I believe gravatar.com says on their website that images may be cached so it can take a while for them to show up in your blog.
I posted a comment on my blog before adding my email address to gravatar.com, which displayed the default “no gravatar image” as expected. Then added the email address and Gravatar image at gravatar.com. No change. Finally I posted a 2nd comment in my blog. The first comment’s gravatar image didn’t change, but the second comment had the correct image. To note, I had a custom database that I transferred into WordPress, which I’ve never worked with before last month, so it’s possible I had a bug in my importer.
Michael, very rarely do I come across coding that’s as neat and well-written as yours. Absolutlely wonderful. I’m a desginer/ PHP/MySQL developer and I’m very fussy. I happened upon your site through Yahoo looking for plugins for one of my clients. For those who are less technically-inclined and wondering if this is the right place to purchase a WP theme, I say go directly to www.solostream.com, pass Go, collect $200.
Comment by Oscar on 10 March 2008:
It seems that there’s indeed a Firefox/IE kind of bug to this. If it works with IE, it only pulls for the bio-avatar, not the comments. That is, when it works completely with FF. Seems kind of random though, worrying - yes.
Comment by jim brown on 11 March 2008:
Hi, I do not want this function as most people leavingcomments will not have nor will they want a gravatar, how can I stop the Gravatar logo from showing up when people comment and replace it with a graphic of my own. Thanks.
Comment by daminc on 11 March 2008:
byyy the way!!
How about an option - taking avatar from Mybloglog instead from gravtar?
I mean, like on this blog: uberaffiliate.com
Comment by Michael Pollock on 11 March 2008:
Oscar: There’s no bug. Be sure to follow the directions in this comment.
Jim and Daminc: See this comment.
Comment by Gary Cheeseman on 12 March 2008:
Just testing gravatar.
Great template.
Comment by Gary Cheeseman on 12 March 2008:
Had to make the
comment_author_email ) ) {
$md5 = md5( $comment->comment_author_email );
echo “”;
}
?>
change you mentioned above.
Can you explain the difference?
Comment by Richard Telofski on 13 March 2008:
Re Gravatar not showing up.
I had the same problem for a while until I realize 2 things.
1) My email address was not EXACTLY the same, as Michael stated. Watch out for any lower or upper case differences.
2) On the Gravatar site, after registering your email address and uploading your photo you must take the last step and assign the photo to the email address desired. The instructions on the Gravatar site are a bit murky on this one.
After I corrected these two things, my Gravatar started to pull as expected.
Hey Michael, let me add my kudos. Great theme!
Comment by Richard Telofski on 13 March 2008:
Ooops. On my previous post, I neglected to enter my email address exactly as on my Gravatar account. Notice it didn’t pull.
Here’s my correction.
Comment by Richard Telofski on 13 March 2008:
Hi Michael,
Just testing the gravatar pull again.
Thanks.
Comment by facecow on 15 March 2008:
This is a test
Comment by Eddie on 15 March 2008:
I have the Gravatar showing in the “About The Author” section bit it just shows the default Gravatar image in the comments any ideas on this?
Comment by Rasheq Rahman on 16 March 2008:
Testing ..
Comment by Joel on 17 March 2008:
Hi Michael,
Wordpress 2.5 is due to be released today, though from the look of their milestone page it may be delayed. According to the release notes it isn’t supposed to affect themes much, though they are adding a
get_avatar()pluggable function. Whatever that is. In any case, do you have any plans to make this theme compatible with v2.5, assuming it isn’t already?Comment by BryGuy on 17 March 2008:
I followed the install instructions. The gravatar link is working at the bottom of the post, but no Gravatar pics are being displayed with the recent comments.
Also I’m trying to edit the Style Sheet and can’t find the code for the following:
1. color: for links & visited.
2. background & color: for the “Other Recent Articles” located just below the 468×60 banner.
Thanks,
Bryan
Comment by Chozen on 17 March 2008:
For some reason no gravars are showing up just the default image on my site hiphopmusicdotcom.com.
Comment by shayne on 27 March 2008:
gravatar test
Comment by Phil Thomas on 4 April 2008:
A gravatar test
Comment by Michael G. Cohen on 13 April 2008:
Such an amazing design as we all know…I was hoping to drop the Gravatar feature completely and was wondering if anyone knew how to do this.
Thanks in advance.
Comment by Simple Daily Recipes on 15 April 2008:
Love the theme! Great job. Worth every penny.
I have one issue. When I click the author link on the single post page I am getting a 404 message. I’m not sure if I did something wrong in the page or if it is an known issue.
Here’s a page example:
http://simpledailyrecipes.com/roasted-yellow-squash/
Here is the author link:
http://simpledailyrecipes.com/author/Jill
Any suggestions would be greatly appreciated.
Thanks,
Charles McKeever
SimpleDailyRecipes.com
Comment by Iskwew on 16 April 2008:
I have the same issue, so I don’t think it’s anything you did, Charles.
Comment by Michael Pollock on 17 April 2008:
Charles and Iswew:
I emailed you the fix.
For anyone else with a similar problem, post another comment with your issue. I’m having trouble posting the fix here … Wordpress seems to want to keep adding rel=”nofollow” to my code.
Best - Michael
Comment by Steve Nash on 18 April 2008:
Hi,
got my gravatar working fine on my dive blog.
However, I want to be able to set a nicer default photo for those who do not have a gravatar. Any ideas?
I’ve checked the coding but it seems different to the following which Michael posted previously,
comment_author_email ) ) {
$md5 = md5( $comment->comment_author_email );
$default = urlencode( ‘http://www.solostream.com/images/nophoto.gif’ );
echo “”;
}
?>
I assumed if i found this and changed the default nophoto.gif with my own defualt photo and pointed to it on my server it would be fine.
But I don’t have the above coding in my template.
Instead the closest I can find is:
comment_author_email ) ) {
$md5 = md5( $comment->comment_author_email );
echo “”;
}
?>
which seems to always want to take a gravatar fro the gravatar account but I can’t seem to understand where the blue default image comes from when the author does not have a gravatar?
Any help would be much appreciated.
Would also appreciate someone placing a comment on my site who does have a gravatat just to make sure that is all working fine - cheers.
www.hititrunning.com
Comment by Steve Nash on 18 April 2008:
Sorry the whole of the coding did not come out on the previous post.
The coding I have is as follows;
comment_author_email ) ) {
$md5 = md5( $comment->comment_author_email );
echo “”;
}
?>
Comment by Adam B on 2 May 2008:
This was a great experience - I was able to set everything up in under an hour.
Comment by Steve Nash on 5 May 2008:
With some help from Michael (thanks once again) and some fiddling I have manged to put up my own image instead of the big blue default image from Gravatar.
You will need to change the main comments template along with the comments in the sidebar template.
The only thing to remember is to resize your own images to 48×48 before uploading them as this does not auto resize.
Comments template:
change the appropriate area which looks something like:
Open your Comments template and find this code:
<?phpif ( !empty( $comment->comment_author_email ) ) {
$md5 = md5( $comment->comment_author_email );
echo "<img class='comment-grav' src='http://www.gravatar.com/avatar.php?gravatar_id=$md5&size=48' alt='' />";
}
?>
Change to this:
<?phpif ( !empty( $comment->comment_author_email ) ) {
$md5 = md5( $comment->comment_author_email );
$default = urlencode( 'http://www.yoursite.com/imagepath/image.jpg' );
echo "<img class='comment-grav' src='http://www.gravatar.com/avatar.php?gravatar_id=$md5&size=48&d=$default' alt='Gravatar' />";
}
?>
Sidebar Template:
Change the following from the sidebar template:
<li style="clear:both;"><?php if ( !empty( $comment->comment_author_email ) ) { $md5 = md5( $comment->comment_author_email ); echo "<img class='home-grav' src='http://www.gravatar.com/avatar.php?gravatar_id=$md5&size=48&' alt='' />"; } ?>
<?php comment_excerpt() ?><br /><strong><?php comment_author_link() ?> | <?php comment_date('jMy'); ?> | <a class="more-link" href="<?php echo get_permalink($comment->comment_post_ID); ?>#comment-<?php comment_ID(); ?>">More</a></strong>
</li>
Change to this:
<li style="clear:both;"><?php if ( !empty( $comment->comment_author_email ) ) { $md5 = md5( $comment->comment_author_email ); $default = urlencode( 'http://www.yoursite.com/imagepath/image.jpg' ); echo "<img class='home-grav' src='http://www.gravatar.com/avatar.php?gravatar_id=$md5&size=48&d=$default' alt='Gravatar' />"; } ?>
<?php comment_excerpt() ?><br /><strong><?php comment_author_link() ?> | <?php comment_date('jMy'); ?> | <a class="more-link" href="<?php echo get_permalink($comment->comment_post_ID); ?>#comment-<?php comment_ID(); ?>">More</a></strong>
</li>
Worked for me.
Comment by Ophelia on 13 May 2008:
gravatar test here
Comment by Cliff Calderwood on 14 May 2008:
Hi Michael,
This is an extremely versatile theme and I’m enjoying customizing it with the tutorials you provided - great job.
I did work on the Gravatar today and now I’m having the same problem that some people had back in April with the 404 error coming up when you click on my author link in a single post page. I think you sent them a fix - can you do the same for me if you’re still having trouble posting it?
Thank you.
Cliff
Comment by Michael Pollock on 15 May 2008:
>>>>> I did work on the Gravatar today and now I’m having the same problem that some people had back in April with the 404 error coming up when you click on my author link in a single post page. I think you sent them a fix - can you do the same for me if you’re still having trouble posting it?
Hi Cliff:
Open your Single Post template and find this line:
<p style="padding-top:5px;"><a href="<?php bloginfo('url'); ?>/author/<?php the_author_nickname(); ?>">See All Posts by This Author</a></p>Change this:
<?php the_author_nickname(); ?>To this:
<?php the_author_login(); ?>Best - Michael
Comment by Rob on 15 May 2008:
This is really a Gravatar test but whilst I am here I must say this wordpress theme is the best I have seen. So easy and intuitive it is a pleasure to use. Set everything up and apart from writing the posts, it is all automatic.
Comment by Guy on 17 May 2008:
Strange Gravatar works on http://blog.gravatar.com/2007/03/02/gravatar-properly-syncing-again/#comment-5162
but seems not to work here, Michael help plse? Thanks anyway.
Comment by Michael Pollock on 17 May 2008:
Guy: Your email address must match your Gravatar email address EXACTLY; that includes capitalization.
After I changed your email address from Guy@… to guy@…, it worked fine.
Best - Michael
Comment by Guy on 17 May 2008:
Great Michael ,
I need to watch out with my auto fill in. Many Tx
Comment by korhan on 1 June 2008:
testing gravatar pls.
Comment by luckykor on 5 June 2008:
I purchased your theme and it is one of the best I have seen so far! Thanks alot! By the way, using your theme, I created www.trabzonspor.mobi website. I have done some changes and had no problem at all. Thank you again for your excellent tutorials.
Comment by xtx on 14 June 2008:
test gravatar
Comment by Jakob on 20 June 2008:
testing gravatar
Comment by Richard Telofski on 21 June 2008:
An even easier way of removing the Gravatar from the comments on the sidebar is to go into the sidebar file and find the Gravatar section.
Where it says “www.gravatar.com etc” just put one random letter in the gravatar URL. The sidebar then won’t pull the default Gravatar picture or any other, and you can easily remove the random letter when you want to reactivate it.
Again, Michael. Super theme!
Comment by Richard Telofski on 21 June 2008:
Again, the email address must be EXACTLY the same.
Comment by Brent on 21 June 2008:
gravatar test
Comment by Koi on 2 July 2008:
testing my gravatar
Comment by Ben on 2 July 2008:
testing it out
Comment by stef on 12 July 2008:
Test my gravatar
Comment by iTransInter on 13 July 2008:
So many people testing ?

Here coming…..
Comment by Iskwew on 18 July 2008:
Hi Michael,
how can I get the theme to use the new Identicons instead of the gravatar picture, which it currently insists on using? I have marked that I want identicons used, but it still gives me the gravatar G.
Regards,
Iskwew
Comment by Michael Pollock on 22 July 2008:
>>>>> how can I get the theme to use the new Identicons instead of the gravatar picture, which it currently insists on using? I have marked that I want identicons used, but it still gives me the gravatar G.
1. Open the Comments template, and find this block:
<?phpif ( !empty( $comment->comment_author_email ) ) {
$md5 = md5( $comment->comment_author_email );
echo "<img class='comment-grav' src='http://www.gravatar.com/avatar.php?gravatar_id=$md5&size=48' alt='' />";
}
?>
Change to this (you may want to adjust the “&size” and “size” element below) :
<?php /* This adds the Gravatar */ if (function_exists('get_avatar')) { ?><?php echo get_avatar($comment,$size='48'); ?>
<?php } else { ?>
<?php if ( !empty( $comment->comment_author_email ) ) {
$md5 = md5( $comment->comment_author_email );
echo "<img class='avatar' src='http://www.gravatar.com/avatar.php?gravatar_id=$md5&size=48' alt='' />"; } ?>
<?php } ?>
———————————–
2. Open Sidebar template, and find this block:
<?php if ( !empty( $comment->comment_author_email ) ) { $md5 = md5( $comment->comment_author_email ); echo "<img class='home-grav' src='http://www.gravatar.com/avatar.php?gravatar_id=$md5&size=48' alt='' />"; } ?>Change to this (you may want to adjust the “&size” and “size” element below) :
<?php /* This adds the Gravatar */ if (function_exists('get_avatar')) { ?><?php echo get_avatar($comment,$size='48'); ?>
<?php } else { ?>
<?php if ( !empty( $comment->comment_author_email ) ) {
$md5 = md5( $comment->comment_author_email );
echo "<img class='avatar' src='http://www.gravatar.com/avatar.php?gravatar_id=$md5&size=48' alt='' />"; } ?>
<?php } ?>
———————————–
3. Open the Single Post template, and find this block:
<h3>About the Author</h3><?php /* this is the author photo pulled from gravatar.com */
$md5 = md5( $email=get_the_author_email() );
$default = urlencode( 'http://www.solostream.com/images/nophoto.gif' );
echo "<img class='auth-single-post' src='http://www.gravatar.com/avatar.php?gravatar_id=$md5&size=75&default=$default' alt='author photo' />";
?>
Change to this (you may want to adjust the “&size” and “size” element below) :
<h3>About the Author</h3><?php // this is the author photo pulled from gravatar.com
if (function_exists('get_avatar')) {
$author_email = get_the_author_email();
echo get_avatar($author_email,$size = '64');
} else {
//alternate gravatar code for < 2.5
$md5 = md5( $email=get_the_author_email() );
echo "<img class='avatar' src='http://www.gravatar.com/avatar.php?gravatar_id=$md5&size=64' alt='author photo' />";
} ?>
———————————–
4. Add the following to your Stylesheet template:
img.avatar {padding:1px;
background:#fff;
border:1px solid #ccc;
float:right;
margin:0 0 10px 10px;
}