/ Published in: PHP
URL: http://wordpress.org/support/topic/custom-default-avatar
Add the following to your active theme's functions.php file then upload an image named "avatar.jpg" to your active theme's image folder. The image can be named anything you would like but be sure to change it in the code below as well.
The last step is to visit: Settings > Discussion to select the new avatar as the default.
Expand |
Embed | Plain Text
// Add a default avatar to Settings > Discussion function fb_addgravatar( $avatar_defaults ) { $myavatar = get_bloginfo('template_directory') . '/images/avatar.jpg'; $avatar_defaults[$myavatar] = 'Doc4'; return $avatar_defaults; } add_filter( 'avatar_defaults', 'fb_addgravatar' ); }
You need to login to post a comment.
