Adding a new avatar image to the default wordpress avatar called mystery man was always a new bloggers problem, Follow our tutorial and choose avatar which is more suitable to your theme.
Open your theme’s functions.php file and add this new function.
add_filter( 'avatar_defaults', 'newgravatar' );
function newgravatar ($avatar_defaults) {
$myavatar = get_bloginfo('template_directory') . '/images/my-gravatar.jpg';
$avatar_defaults[$myavatar] = "My Avatar";
return $avatar_defaults;
}
We are done. Using the add_filter function we changed the avat_default function a little bit, with newgravatar function. We added our new avatar in default wordpress avatar list. Change my-gravatar.jpg with your own. This file must be located in /images/ folder of your theme.
Now in order to change your default avatar go to Settings>Discussion and choose your image.
Cheers, Joshu
Exactly what i was searching for.
Also do you know can these be done automatically by any plugins ?
Do let me know ….
Hey !
Infact this is the simplest method, And plugins are there, they will only allow your memebrs to add local avatars at the time of posting. (as far as i know)
Do this and easly add more and more avatars !
Cheers, Josh
i did not quiet get this working on changing the mistery man avatar, could you help me a lil further josh, ?
-kevin
The webpage is actually full of outstanding detail and is actually really exciting to read.
Properly done.
thnx
Great and easy…..thnx for info