Skip to content

Instantly share code, notes, and snippets.

@cdils
Created September 15, 2014 18:34
Show Gist options
  • Save cdils/50369f6dd901965bebbb to your computer and use it in GitHub Desktop.
Save cdils/50369f6dd901965bebbb to your computer and use it in GitHub Desktop.
Hook site avatar before site title
//* Hook site avatar before site title
add_action( 'genesis_header', 'sixteen_nine_site_gravatar', 5 );
function sixteen_nine_site_gravatar() {
$header_image = get_header_image() ? '<img alt="" src="' . get_header_image() . '" />' : get_avatar( get_option( 'admin_email' ), 224 );
printf( '<div class="site-avatar"><a href="%s">%s</a></div>', home_url( '/' ), $header_image );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment