Created
June 10, 2013 02:09
-
-
Save jayshreehcl/5746107 to your computer and use it in GitHub Desktop.
Copy and paste the code provided below to add custom default avatar in wordpress. The code provided below is only for genesis theme users. For ore details please kindly read the article at : http://blogvkp.com/how-to-add-custom-default-avatar
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
//***Adding Custom Default Avatar In Wordpress**/ | |
add_filter( 'avatar_defaults', 'blogvkp_custom_gravatar' ); | |
function blogvkp_custom_gravatar ($avatar_defaults) { | |
$myavatar = get_stylesheet_directory_uri() . '/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 more details in this article; read further at : How To Add Custom Default Avatars In Wordpress