Created
June 10, 2013 02:23
-
-
Save jayshreehcl/5746147 to your computer and use it in GitHub Desktop.
Code provided below helps you to customize default avatar in WordPress. This code is for all non genesis theme users. This means if you have bought any premium theme or have created your own or if you have download it for free for any source then use the snippet provided below. make sure to copy the code at the bottom of your theme's function.ph…
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//**Add Custom Default Avatar In Wordpress To Other Common Themes**/ | |
add_filter( 'avatar_defaults', 'blogvkp_custom_gravatar' ); | |
function blogvkp_custom_gravatar ($avatar_defaults) { | |
$myavatar = get_bloginfo('template_directory') . '/images/custom-gravatar.jpg'; | |
$avatar_defaults[$myavatar] = "Custom Gravatar"; | |
return $avatar_defaults; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For further instructions please kindly read more at Adding Custom Default Avatar In Wordpress