How To Change The Default Avatar In Your WordPress Blog
27.07.10 by Jerome in Tutorials
Here is a tip for today- I will show you how to add your own custom avatar into your WordPress blog. Why would you do that? Maybe because you want to make your blogs look more professional or simply because your are tired to see “Mystery Man” everywhere. Just follow these quick steps below:
Step 1
First create your own custom avatar (recommended size width: 100px height: 100px) and drop it into your theme images folder.
Step 2
Under your theme files open your functions.php file and drop the code below and make sure to change your avatar path and name:
// Custom Default Avatar if ( !function_exists('addgravatar') ) { function addgravatar( $avatar_defaults ) { $myavatar = get_bloginfo('template_directory').'/images/custom-gravatar.jpg'; //=> Change path to your custom avatar $avatar_defaults[$myavatar] = 'Custom Avatar'; //=> Change to your avatar name return $avatar_defaults; } add_filter( 'avatar_defaults', 'addgravatar' ); }
Step 3
In the admin area go to the Settings tabs –> Discussion and select your new avatar and click save.
![]()
Related posts:
blog comments powered by Disqus






