web
analytics
≡ Menu

How to Change the Default Gravatar in WordPress Blog?

I personally don’t like the default gravatar in wordpress blog, because it looks little ugly on my blog. Although people are now smart enough to use a personalize image or picture for there email address, but still a portion of people don’t use them.

Want to see the default garvatar on wordpress?

change dafault gravatar for wordpress
Every time when your reader post a comment in your blog, the default gravatar appears with the comment. If you want to change it to to a cooler and nicer one, then just follow the step mentioned below.

Before going for the details, let me first show you the tutorial for adding a personalize avatar or gravatar for your email address. Follow the tutorial about How to Add Author Gravatar for Blog and stand out from the crowd.

How to change the default gravatar in wordpress?

First thing first, create a gravatar and upload to your image directory. Now open your function.php file from Appearance>Editor.

And paste the following code in function.php

add_filter( ‘avatar_defaults’, ‘newgravatar’ );
function newgravatar ($avatar_defaults) {
$myavatar = get_bloginfo(’template_directory’) . ‘/images/gravataricon.gif’;
$avatar_defaults[$myavatar] = “NameforGravatar“;
return $avatar_defaults;
}

Change NameforGravatar to whatever you want.

Now Go to your blog DashBoard>Setting>Discussion and select the gravatar uploaded to the image directory, and click on save button.

It is done. Now the default garvatar is replaced by the one uploaded to the image directory.

{ 0 comments… add one }

Leave a Comment