Just copy paste following code to functions.php file.
if ( !function_exists(‘fb_addgravatar’) ) {
function fb_addgravatar( $avatar_defaults ) {
$myavatar = get_bloginfo(‘template_directory’).’/images/avatar.gif’;
//default avatar
$avatar_defaults[$myavatar] = ‘people’;
$myavatar2 = get_bloginfo(‘template_directory’).’/images/myavatar.png’;
//Avatar for user “admin”
$avatar_defaults[$myavatar2] = ‘admin’;
return $avatar_defaults;
}
add_filter( ‘avatar_defaults’, ‘fb_addgravatar’ );
}
![]()
Thanks to WpEngineer for this such great wordpress hack!
I found useful following articles for wordpress plugin developers.
http://codex.wordpress.org/Using_Gravatars
http://codex.wordpress.org/Function_Reference
http://codex.wordpress.org/Function_Reference/add_filter
http://codex.wordpress.org/Plugin_API/Filter_Reference






Cool blog, interesting post. I’ll be returning soon. Hopefully there will be more quality posts like this. =)
This post makes a lot of sense !
Nice post! You truly have a wonderful way of writing which I find captivating! I will definitely be bookmarking you and returning to your blog. In fact, your post reminded me about a strange thing that happened to me the other day. I’ll tell you about that later…
Good! Thank you! I always wanted to write in my site something like that. Can I take part of your post to my blog?
Great read. Thanks for the info!
Intriguing post. I have been searching for some good resources for solar panels and discovered your blog. Planning to bookmark this one!
Interesting read, perhaps the best article iv’e browse today. We learn everyday cheers to you!
Nice post! You truly have a wonderful way of writing which I find captivating! I will definitely be bookmarking you and returning to your blog. In fact, your post reminded me about a strange thing that happened to me the other day. I’ll tell you about that later…
Thanks for posting. Good to see that not everyone is using RSS feeds to build their blogs
Awesome post. I so good to see someone taking the time to share this information
Intriguing post. I have been searching for some good resources for solar panels and discovered your blog. Planning to bookmark this one!
I REALLY liked your post and blog! It took me a minute bit to find your site…but I bookmarked it. Would you mind if I posted a link back to your post?
I would like to say “wow” what a inspiring post. This is really great. Keep doing what you’re doing!!
Thanks for posting. Good to see that not everyone is using RSS feeds to build their blogs
I’ve just started off a blog, the knowledge you give on this site has aided me extremely. Thank you for all your time & work.
I was just having a conversation over this I am glad I came across this it cleared some of the questions I had.
Awesome post. I so good to see someone taking the time to share this information