/ Published in: PHP

Add the following code to the end of the functions.php file. Et voilà !
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function add_custom_gravatar ($avatar) { $custom_avatar = get_bloginfo('template_directory') . '/images/name-of-your-custom-gravatar.jpg'; $avatar[$custom_avatar] = "Gravatar name to be shown in the WordPress settings"; //change this name to your preferences return $avatar; } add_filter( 'avatar_defaults', 'add_custom_gravatar' );
Comments
