1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

How To: Changing the Default WordPress Gravatar

Jul 24 2008

Category: Themes and Tricks

Download | Demo

If you’ve been with WordPress awhile, you’ll probably remember back in October of 2007 when Automattic purchased Gravatar.   The concept behind Gravatar had always been an incredible idea, but it had always lacked the time and resources needed to make it work.  Now that Automattic acquired Gravatar, it was pretty obvious that the service would be resurrected and would be a great fit for the WordPress platform.

Earlier this year when WordPress 2.5 came out, a shift was made in the WordPress community from the widely popular MyAvatars plugin (which uses MyBlogLog avatars) to Gravatars.   In addition to being built into WordPress.com blogs, we were also given the ability to build Gravatars into your WordPress.org blog.  But, did you know that WordPress.org blog owners can now also create your own custom default Gravatar image?

Over at Pro Blog Design, Michael has written a great tutorial explaining exactly how to add your own default Gravatar image, as well as provide some tips on how to make a good Gravatar default image.

In order to add the image you’ve made, you just need to take your Gravatar code and add the image URL right after the comma:

Before

<?php if(function_exists(’get_avatar’)){ echo get_avatar($comment, 50 );} ?>

After

<?php if(function_exists(’get_avatar’)){ echo get_avatar($comment, 50, 'http://www.hackwordpress.com/wp-content/themes/HackWordPressPro/images/nophoto.gif');} ?>

Great tip Michael!  You’ll want to click over to see Michael’s tips on creating a custom “No Gravatar” logo for your website.


Related Articles at Hack WordPress:


You are reading How To: Changing the Default WordPress Gravatar. This post is the property of Hack WordPress © 2008.

Enjoy writing about WordPress? Get your blog more exposure by joining the Hack WordPress writing team!

Digg This! | Stumble This! | Add to Del.icio.us! | Google Bookmark It!


Read it at the source

Leave a Reply