Site Overlay

Avatars or Gravatars for WordPress

Gravatar / Avatar
Gravatar / Avatar

Add More Default Avatar Choices to the WordPress Admin. Add the following code in the functions.php :

// Add More Default Avatars to Options
if (!function_exists('ss_addgravatar')) {
function ss_addgravatar($avatar_defaults) {
$myavatar1 = get_bloginfo('template_directory').'/images/avator/01.png';
$avatar_defaults[$myavatar1] = 'rock';
$myavatar2 = get_bloginfo('template_directory').'/images/avator/02.png';
$avatar_defaults[$myavatar2] = 'Cool';
$myavatar3 = get_bloginfo('template_directory').'/images/avator/03.png';
$avatar_defaults[$myavatar3] = 'Geek';
$myavatar4 = get_bloginfo('template_directory').'/images/avator/04.png';
$avatar_defaults[$myavatar4] = 'Pretty';
return $avatar_defaults;
$myavatar5 = get_bloginfo('template_directory').'/images/avator/05.png';
$avatar_defaults[$myavatar5] = 'Sexy';
return $avatar_defaults;
}
add_filter('avatar_defaults', 'ss_addgravatar');
}

If you want to get your globally recognized avatars then you can use Gravatars. An avatar or gravatar is an icon, or representation, of a user in a shared virtual reality, such as a forum, chat, website, or any other form of online community in which the user(s) wish to have something to distinguish themselves from other users. Created by Tom Werner, gravatars make it possible for a person to have one avatar across the entire web. Avatars are usually an 80px by 80px image that the user will create themselves.

Click here to get your own Gravatars.

Published By:

Author: sakinshrestha

Hello. My name is Sakin Shrestha, and I am a technology entrepreneur from Nepal. I am passionate about helping this sector grow, for many reasons. The technology sector creates jobs for many young Nepalis who would otherwise migrate to foreign countries. It lets Nepali professionals develop skills for a fast-changing global workplace, and compete at a high level with anyone, anywhere in the world. If it grows, it will provide a viable career option for many young Nepalis, and help us reap the benefits of a global economy.

1 thought on “Avatars or Gravatars for WordPress

Comments are closed.