How to Change the Default Gravatar on WordPress

Would you like to change the default Gravatar on your WordPress website? To adding default Gravatar image we can set up good looking area on the comments section. In this article, we will show you how to change the default gravatar in WordPress and we can replace it with our own custom Gravatar image. It’s very simple and easy to change the default gravatar on WordPress.
Below picture is saying that it’s a default setting.


istanbul eskort
Now we will customize and add new custom gravatar image and show you the process. First upload any gravatar image you want to display Here is the code:

add_filter( 'avatar_defaults', 'wp_new_gravatar' );
function wp_new_gravatar ($avatar_defaults) {
$myavatar = 'http://dummysite.com/wp-content/uploads/2017/01/wpb-default-gravatar.png';
$avatar_defaults[$myavatar] = "Default Gravatar";
return $avatar_defaults;
}

After adding this code in the function.php file we will have to check the “Discussion” section under “Settings”.

Change the Default Gravatar on WordPress

Now this custom gravatar image will be display as a Default Gravatar on WordPress.