Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Adds a default Gravatar through functions.php to Wordpress
<?php
// Add a default Gravatar if user doesn't have one
if ( !function_exists('rYno_newgravatar') ) {
function rYno_newgravatar( $avatar_defaults ) {
$newgravatar = get_bloginfo('template_url').'/images/new-gravatar.gif';
$avatar_defaults[$newgravatar] = 'New Custom Gravatar';
return $avatar_defaults;
}
add_filter( 'avatar_defaults', 'rYno_newgravatar' );
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.