Add Custom WordPress Avatar

After or before you Add Author Box in WordPress Posts and you want to change the biography information and add a custom WordPress avatar. The result will look close to this:

Wordpress Author Box

1. WordPress Settings

Click on the Users on the left side of your Dashboard, below the Plugins. Here, select the user and stroll down to edit the Biographical Info section. Remember to update your profile when are done.

2. Open functions.php

Look for your theme functions.php in Appearance and Editor. Add the code below to your last WordPress functions.

add_filter( 'avatar_defaults', 'new_avatar' );
function new_avatar($avatar_defaults){
$new_avatar = get_stylesheet_directory_uri() . '/images/avatar_logo.png';
$avatar_defaults[$new_avatar] = "Avatar Logo";
return $avatar_defaults;

Change the information as needed.

Replace ‘/images/avatar_logo.png’ with the media location of your image.
Replace “Avatar Logo” with whatever name you like.

3. Your Settings

To see if the changes that you make and select your avatar to show up in your blog, place your mouse on Settings and select Discussion. Stroll down to Default Avatar, select your avatar, and save it. Go black to your blog post to see if its there.

User Avatar
Discussion Settings


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>