Skip to content

Frequently Asked Questions

Cătălin Dogaru edited this page Apr 3, 2016 · 3 revisions

Can I choose between my Gravatar and my custom avatar?

Yes, you can choose between your Gravatar and your custom avatar under the Users Your Profile Screen.

Can I choose a rating for my custom avatar?

Yes, you can choose a rating for your custom avatar under the Users Your Profile Screen.

Can low privileged users upload their own avatar?

Yes, you can enable this feature under the Settings Discussion Screen.

Can I add the self-hosted avatars to my template files?

Yes, you can add the self-hosted avatars to your template files by using the WordPress built-in get_avatar() function to retrieve the avatar for a user who provided a user ID or email address.

Can I create a default custom avatar?

Yes, you can easily add your own by adding a filter to the avatar_defaults hook. After uploading the new image to your theme files, add this to your theme’s function.php file:

<?php
function custom_avatar_defaults ( $avatar_defaults ) {
	$avatar_url = get_bloginfo( 'template_directory' ) . '/images/avatar-default.png';
	$avatar_defaults[$avatar_url] = __( 'Custom Default Avatar', 'mytextdomain' );

	return $avatar_defaults;
}

add_filter( 'avatar_defaults', 'custom_avatar_defaults' );
?>

Now, go to Settings Discussion Screen and select your new avatar from the list.

Clone this wiki locally