Create Your Own Image to Change The Default Gravatar in WordPress

WordPress provides some images to choose as the default gravatar, this gravatar will be appear if a comment doesn’t have gravatar. Can we change these default gravatar? We want our comment section is unique and give a more personalized touch. In this tutorial we’ll take a custom image and add it as the default gravatar.

change-cover

If we see the others famous blogs, most of them use this feature…let we see the example below :

How to?

Please look the goal of our project as shown below

thegoal

Step 1 – Create an image for gravatar in photoshop

  1. Make a new file, we will make an image of size 400×400 pixels
    gbr1
  2. Then make a background for this image, I choose the color  [#0054a6] and [#0d004c] then with the gradient tool I drew a line from the top left corner to bottom right corner.
    gbr2
  3. Now we make the logo, in this tutorial I make a written ‘DW’, with the settings as shown below
    gbr3Then on the Layer Style, I make the settings as shown below
    gbr4
    And see the result

    result2

  4. Next we make the ribbon. I made a square image with color #0054a6 and the size of as shown below
    gbr5Then on the layer style, I use the feature “Drop Shadow”, “Gradient Overlay” and “Stroke” with settings as shown below.
    gbr6
    And see the result

    result3

  5. Make a written “guest”, with the settings as shown below
    gbr7
    Then on the Layer Style, I use the feature Gradient overlay with the settings as shown below
    gbr8
    See the result

    result4

  6. Finally, resize our image with the size like 128x128px or 80x80px or 64x64px or 32×32 px, as shown below
    gbr9

Download

You can download these free gravatar images, six images .png files at 128px.

preview

  free_gravatar.zip (35.2 KiB, 1,161 hits)

Step 2 – Upload your image

Use FTP tools, then upload to your theme directory  “wp-content/themes/yourthemes/images” or you can use the wordpress admin panel > Media > Add New
Then choose edit in your image to see the url link to the image.

Step 3 – Adding new code to function.php

Thanks to build internet for this code (please open the link for more detail explanation)

<?php

add_filter( 'avatar_defaults', 'newgravatar' );

function newgravatar ($avatar_defaults) {
$myavatar = get_bloginfo('template_directory') . '/images/gravatar.jpg';
$avatar_defaults[$myavatar] = "Build Internet";
return $avatar_defaults;
}

?>

Please change this line in accordance with your image link

$myavatar = get_bloginfo('template_directory') . '/images/gravatar.jpg';

Save it.

Step 4 – Change the default gravatar with your own image

In wordpress admin panel > Settings > Discussion

Give the check on a new image that we make before to make it the default gravatar.

default-gravatar

That’s all, but I would love to hear your thoughts and suggestions in the comment section below on any areas that you need further clarification or that you would do a little bit differently.

Subscribe for sessions to pass 646-578 exam with guarantee.Also download icnd link for the next exam,after getting success in 642-813 exam you can find a excellent job.

30 Comments to “Create Your Own Image to Change The Default Gravatar in WordPress”

Add Comments (+)

  1. I wanted to thank you for this excellent read!! I definitely enjoyed every little bit of it. I have you bookmarked your site to check out the new stuff you post.

  2. Rob says:

    Thanks so much for this! Very useful :)

  3. It’s amazing how you managed to make simple things that until a few days ago seemed complicated. Thanks again for the post

  4. Thanks for your detail n excellent tutorials :cheers:

  5. Z says:

    Nice post thank you for sharing! :-)

  6. Hanif says:

    I was did this tutorial and great… My blog look awesome and professional. Thanks.

  7. Sue says:

    Thanks! This makes my blog look much more professional and keeps the theme.

  8. Amy says:

    Thanks a million for this.

    Super easy tut and love the result.

  9. Kiwi says:

    Really GREAT!
    I was looking for a tut like for a long time and now I got the solution.
    THX!

  10. Thanks for this tutorial. I just created my own default gravatar for my blog and I’m very happy with the results. It was easy to follow and get working. I think many can do this change with ease and maybe WP should make it possible to upload a gravatar in the backend without adding a function ;)

  11. I have just posted about this little hack and it will be published later today with a link back to this post. I hope many others will try it and give their blog/site a personalized look and feel.

  12. Martin says:

    I think many can do this change with ease and maybe WP should make it possible to upload a gravatar in the backend without adding

  13. Nab says:

    im still navigating your blog, you have a huge useful information, im really happy that i found you, you answered a lot of questions that seems complicated for me, still reading other posts and taking notes. really you are the best thank you :)

  14. Mstasci says:

    Have a nice sharing, thank you.

  15. Techie Zone says:

    Hi,

    You have explained it pretty well. But in your code it still shows Build Internet. SO you need to replace the Build Internet in the code that you add to fucntion.php file with your own website name. See the sereen shot of the WordPress Admin page where you set Gravatar also shows ur icon but shows Build Internet as name.

  16. Hafid says:

    This is good hint, but I wanna ask, this default avatar will follow me, if i write some comment to another blog, or it just for my blog?

    I’ll try that code… thanks.

  17. Caroline says:

    I changed back to Twenty Ten and now it’s not working anymore.

    The picture links to:
    /wp-content/themes/twentytentwentyten/images/gravatar.png?s=40

    it should be:
    /wp-content/themes/twentyten/images/gravatar.png

    What can I do?

  18. Designely says:

    Excellent post! I have been looking for this little tweak to add it to my WordPress theme that I’m currently working on…

    Thanks!

  19. trading says:

    magnificent put up, very informative. I ponder why the opposite specialists of this sector do not realize
    this. You must proceed your writing. I am confident, you’ve a huge readers’ base already!

  20. zetar says:

    Yes,your point is great,if you are interesting in packaging,plaese scan the next.
    Life is like to buy a packaging, buy a good packaging like to find a good object, we mutually consistent. Buy a bad package, simply do not fit your product, but not worth the candle, if forced to use an incompatibility with their own objects, even if married, it will not last long. Cherish life, to find a good object, buy a good packages.We are special in packaging and  Package Manufacturer and please send email to: info@zetarpackaging.com, our website is http://www.zetarpackaging.com

  21. Nizul Zaim says:

    Thanks for nice sharing… i use in my web.. you can see here >> http://skynightz.com/pentingkah-web-atau-blog-yang-kemas-dan-cantik/

  22. jhones says:

    Thanks for the info… helpful

  23. Rubesh says:

    Great share, Thanks for systematic instructions…:)

Trackbacks/Pingbacks

  1. CSS Brigit |
  2. wp-popular.com » Blog Archive » Create Your Own Image to Change The Default Gravatar in Wordpress | DynamicWP
  3. uberVU - social comments
  4. London’s Strata SE1 Skyscraper Boasts Built-in Wind Power | nachhaltiger.net
  5. 2010-03-24 유용한 링크 | We are connected
  6. WordPress Picks for the Week [03/24] | Techtites
  7. How Repair Your Own Laser Printer | Cheap printers
  8. iPad 101: Customize your wallpaper | The Apple Ipad Blog
  9. Fun Day Theme | DynamicWP
  10. Create your OWN WordPress Default Gravatar within Minutes | Serradinho

Leave a Reply

 

Amazingly Beautiful WordPress Themes