//make posts preview with a thumbnail

Sunday, June 23, 2013

How to change default Gravatar in Wordpress


elegant themes, wordpress themes

gravator wordpress

change default gravatar in wordpress

New WordPress users often ask; How can I change that little grey icon that shows up next to their name in the top right hand corner? This little icon is called a Gravatar. Most people want to know how can I turn this grey thing off. Well this grey icon is known as “mystery man” gravatar. In this article we will discuss what is a gravatar and why you should start using a personalized one instead of the "mystery man" and how to change the default gravatar in wordpress.

What is a Gravatar?


Gravatar stands for Globally Recognized Avatar. It is globally recognized because millions of people and websites use them. Most popular applications like WordPress have built-in support for Gravatar. When a user leaves a comment (with email) on a site that supports Gravatar, it pulls their Globally Recognized Avatar from Gravatar servers. Then that picture is shown next to the comment. This allows each commenter to have their identity through out the world wide web.

Implementation of Gravatar is an uprising trend that is being seen on many WordPress Blogs. More and more blogs are following the trend by incorporating a personalized gravatar. Not only bloggers, but theme designers are also focusing on making the best comment box for their WordPress themes and implementing gravatar with creativity.

gravatar wordpress

Why Should I Change Default Gravatar in Wordpress?


If you want to be identified on the web, then you should use a gravatar. If you are a blogger, non-profit, small business, or anyone who wants to build a brand, then you need to start using gravatar. Chances are that you read and comment on blogs. At first your gravatar might not get as much attention. But if the same person sees your comment at numerous sites they read, they will probably end up visiting your website. We as publishers find it really easy to identify our loyal users by their gravatar.

In our opinion, a gravatar makes your comment stand out.

While bloggers may know about gravatar and have an account, there are other users who don’t have a personal gravatar, so when they post a comment on a blog, a mystery man takes over their gravatar. You probably have seen it on many blogs, on a gray background a white guy. Keep reading below to learn how to create a custom gravatar for your blog users which you can incorporate in your blog.

 

How do you make or get a Gravatar?


It’s simple and it’s free. Simply go to Gravatar’s website. Signup with the email that you use the most often to comment. Add an avatar of yourself. This could be a picture of yourself, your company’s logo, or something unique. You really have to do it one time. Chances are you won’t be changing your avatar a lot. So it’s more like set it and forget it.

Most WordPress themes already come with gravatar integration with comments. If your theme doesn’t, then you should seriously consider adding it. For further branding purposes, you can change the default mystery man gravatar on your site and put something else.

change the default gravatar in wordpress

How do I change the default Gravatar in Wordpress?


1. Open your functions.php file which is located in your themes folder.

2. Then paste the following code somewhere in the functions.php file
add_filter( 'avatar_defaults', 'newgravatar' );
function newgravatar ($avatar_defaults) {
$myavatar = get_bloginfo('template_directory') . '/images/gravataricon.gif';
$avatar_defaults[$myavatar] = "This is ME";
return $avatar_defaults;

You need to understand the variables in the code above.

/images/gravataricon.gif’ is the location of the image file. It must be saved under the theme folder that you are using.

Change myavatar to the name that you want to give your Gravatar and you should be all set. I changed it to This is ME (as seen in picture below)

3. Upload this file

4. Login to your WordPress Admin Panel and click on Settings > Discussion

gravatar settings wordpress

 

 

 

 

 

No comments:

Post a Comment