August 25, 2010

TEXT SIZE minus plus

Change Default Gravatar to Your Choice in WordPress

Advertisement
You Might Be Interested In Our Popular Article
  • Most Essential Free Softwares After Windows Installation
  • To brand your blog, you need to take care of all minute things including Default Gravatar (Mystery Man), which is annoying to most readers. This simple tutorial will help you change your Default Gravatar shown on your blog to a custom image.

    Procedure:

    Note: Do take backup of your theme before you try this.

    01. Upload a 48 x 48px image to your theme directory.

    02. In your WordPress Admin panel go to Appearance => Editor.
    editor

    02. Then choose functions.php file from right hand side and add below code:
    functions.php

    add_filter( 'avatar_defaults', 'newgravatar' );

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


    03. In above code change /images/tutzonegravatar.gif to the location/name of your image and TutZone to name of the Avatar which will be shown in your Options Panel and Save file.

    04. Now go to Settings => Discussion and change your default Gravatar to a custom one:
    custom gravatar

    That concludes this simple and useful tutorial. Hope you like it.



    Print

    About the Author

    When I was born I was so shocked I didn't speak for a year and half...... My brain has 2 parts, Right and Left, The Right one has nothing left in it and the Left one has nothing right in it......Who says Nothing is Impossible?? I've been doing nothing for years......