Change the default avatar in your comments

If you’re using WordPress comments on your posts (rather than a system like Disqus), anonymous users get assigned a generic silhouette image. If you want to change this up to extend your branding, you can update this default avatar with the following functions.php code:

add_filter( 'avatar_defaults', 'newgravatar' );

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



6.8
Implementation: 3 hours
Effectiveness: 4/5
Difficulty: 5/10
TAGS
#Tools #Wordpress #Editing