FriendlyWP
10/26/2013 - 1:29 AM

Add custom default avatar

Add custom default avatar

// add a new default avatar to the list in WordPress admin
// change path to reflect where your default image lives
add_filter( 'avatar_defaults', 'mytheme_addgravatar' );
function mytheme_addgravatar( $avatar_defaults ) {
    $myavatar = get_bloginfo('stylesheet_directory') . '/_/images/avatar.gif';
    $avatar_defaults[$myavatar] = 'New Default Gravatar';
    return $avatar_defaults;
}