Change The Default Gravatar On WordPress

If you want to change the default Gravatar you follow 3 steps. It is simple.

1. Design an cool avatar or search by Google Images.

2. Open your functions.php file ( custom_functions.php file with Thesis ) which is located in your themes folder, then paste the following code in there:


/***** No Gavatar http://www.problogtip.com *****/
add_filter('avatar_defaults','newgravatar');
function newgravatar($avatar_defaults) {
$myavatar = get_bloginfo('template_directory').'/images/gravatar.jpg';
$avatar_defaults[$myavatar] = "Problogtip Gravatar";
return $avatar_defaults;
}
/***** #No Gavatar http://www.problogtip.com*****/


* Note: ‘/images/gravatar.jpg’ is the location of the image file. It must be saved under the theme folder that you are using.

3. Login to your WordPress Admin Panel and click on Settings > Discussion. Your gravatar now show up like the picture above displays. Select it and save changes, and you are all set.
Change The Default Gravatar On WordPress Change The Default Gravatar On WordPress Reviewed by Hung Nguyen on Wednesday, May 05, 2010 Rating: 5

No comments:

Sponsor

Powered by Blogger.