Google+

How to Add Your Photo As WP Avatar on Your WordPress.org Blog

Gravatar LogoAdding your face to your blog posts adds personality to your posts and makes it look like they are coming from a real person rather than a blog manufacturing site. It also helps when you leave comments on other people’s blogs and websites, it associates your avatar image with your overall brand. For example, when you see Pete Cashmore, you immediately think Mashable.

Recently while doing a website for a client she asked the same thing, if she could swap out her generic blog avatar to be her picture so that it would be more personalized. She had migrated her blog from Blogger to WordPress.org, so she didn’t have a gravatar to use. Someone recommended she try https://en.gravatar.com/, but that didn’t seem to do it.

As a solution to add her WP avatar to her WordPress.org blog, we added code to her Theme PHP file.

1. Uploaded image of blogger to Media library.

2. In the Themes (function php) file, went into the editor and added the following code:

// Add a default avatar to Settings > Discussion
if ( !function_exists(‘fb_addgravatar’) ) {
function fb_addgravatar( $avatar_defaults ) {
$myavatar = get_bloginfo(‘template_directory’) . ‘link to your image media file.jpg‘;
$avatar_defaults[$myavatar] = ‘YourFirstName‘;

return $avatar_defaults;
}

add_filter( ‘avatar_defaults’, ‘fb_addgravatar’ );
} ?>

The items in bold are what you need to change out.

3. Then go into Settings>Discussion>Default Avatar and select your name.

For WordPress.com, the en.gravatar.com site works just fine.

 

What are your biggest challenges with your WordPress blog?

Send to Kindle
About Tracy Sestili

Tracy Sestili is CEO and Chief blogger at Social Strand Media. She is also the author of Taking Your Brand from the Bench to the Playing Field -- Social Media Fundamentals for Business.