The Right Way to Change The Default Gravatar in WordPress


Sponsored Links




I will show you How to Change the Default Gravatar in WordPress, why? Because one of my favourite WordPress Comment enhancement is added Gravatar, after Gravatar become Automattic Family, Gravatar become more and more better. Especially integrated with many many Automattic Family, and of course WordPresss too.

The Right Way to Change The Default Gravatar in WordPress

The Right Way to Change The Default Gravatar in WordPress

Why changed the default (Misery Man) Gravatar? For me, it’s will make our website more unique and of course we can added extra banner or something in our Default Gravatar. Let’s get started, write down tiny code below in your theme functions.php

Change The Default Gravatar Code

add_filter( 'avatar_defaults', 'customgravatar' );

function customgravatar ($avatar_defaults) {
    $myavatar = get_bloginfo('template_directory') . '/images/custom-gravatar.jpg';
    $avatar_defaults[$myavatar] = "WP Tricks & Tips";
    return $avatar_defaults;
}

You can tweak code above and change the code to reflected your Website, after you write this code on your functions.php don’t forget to upload your custom gravatar into you images folder in your theme, on my example we give the name custom-gravatar.jpg. And done, you have better default gravatar in your website and blog. Thanks for Build Internet to explain and show this wonderful code

Subscribe to Full RSS Feed

RSS FeedIf you thing this article useful, please consider subscribing to our RSS Feed or e-mail updates and stay updated with us. You can also follow @WPTricksNet on twitter for latest updates.

About WP Tricks

We are WordPress Family, we collected and writed useful tips and tricks for you WordPress. We share it for you...

Related Tips and Trick from Local Data and on The Net

Gravatar - Globally Recognized Avatars

Gravatar works seamlessly with your WordPress.com account. Just log in with your WordPress.com username and password. Happy blogging! Read More

How to Change the Default Gravatar in Wordpress | Build Internet

How to Change the Default Gravatar in WordPress So, it can be done right into wordpress now I think Gravatar.com is also a great way to personalize Read More

WordPress › Support » Custom Default Avatar Image Not Showing

Then do you know that right link which it www.wpbeginner.com/wp-tutorials/how-to-change-the-default-gravatar-on-wordpress/ Also I use another way to Cache avatar Read More

How to Set Your Own Default Gravatar in WordPress

How to Set Your Own Default Gravatar in WordPress won’t that be a good way custom_avatar] = "Gravatar name to be shown in the WordPress settings"; //change this Read More

Change Default WordPress Gravatar in Comments - Hacks - PHP Magic

Protect Hotlink the Right Way Using htaccess; Hide Ads from Admin at Blog; Change Default WordPress Gravatar in Comments; Only Allow Your IP to Access Website or Blog Admin Read More


10 Responses to The Right Way to Change The Default Gravatar in WordPress

  1. Pingback: Tweets that mention The Right Way to Change The Default Gravatar in Wordpress #tricks #addfilter #wordpress -- Topsy.com

  2. Pingback: uberVU - social comments

  3. Pingback: Change Editor Style In WordPress 3.0 | Silver Blog

  4. Pingback: How To Load Gravatar on the Fly | Unlock IMEI Cellphones

  5. Pingback: Change Editor Style In WordPress 3.0 | Unlock IMEI Cellphones

  6. Pingback: How To Increasing memory allocate on WordPress | Silver Blog

  7. Curtains says:

    Hi,
    Has anyone tested this on wordpress 3? It doesn’t seem to change anything.

    Would it have something to do with the theme I have installed!

    Any help appreciated. Thanks

  8. cheap hats says:

    I think usually people prefer google search engine for their queries.

  9. ray ban sale says:

    Hi,
    Has anyone tested this on wordpress 3? It doesn’t seem to change anything.

  10. Hi, thanks for sharing.
    Has anyone tested this on wordpress 3? It doesn’t seem to change anything.

    Would it have something to do with the theme I have installed!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>