When we create an account a wordpress blog then we see a default gravatar image like this:
(although that gravatar image you can change.) This gravatar image choosen by wordpress team. but if you can want, you can change this default gravatar image without plugin. when a new user will register your site then him/her default gravatar will changed automatically. for this please follow:
1. Copy this codes:
2. Now paste it on yor wordpress themes 'functions.php' file and save it.
Done!!! now you can change default gravatar from settings like this:
Thanks for visiting my post.
(although that gravatar image you can change.) This gravatar image choosen by wordpress team. but if you can want, you can change this default gravatar image without plugin. when a new user will register your site then him/her default gravatar will changed automatically. for this please follow:
1. Copy this codes:
add_filter( 'avatar_defaults', 'custom_avatar' );Any problems copy code here:
function custom_avatar($avatar_defaults){
$custom_avatar = get_stylesheet_directory_uri() . '/images/author-site.png';
$avatar_defaults[$custom_avatar] = "My Default Avatar";
return $avatar_defaults;
}
2. Now paste it on yor wordpress themes 'functions.php' file and save it.
Done!!! now you can change default gravatar from settings like this:
Thanks for visiting my post.
0 comments:
Post a Comment
Comments here