Skip to content

Instantly share code, notes, and snippets.

@bhwebworks
Created March 15, 2014 00:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bhwebworks/9559948 to your computer and use it in GitHub Desktop.
Save bhwebworks/9559948 to your computer and use it in GitHub Desktop.
Code to remove from Sixteen Nine Pro functions.php to remove the avatar image from the site header
//* Add support for custom header
add_theme_support( 'custom-header', array(
'admin-preview-callback' => 'sixteen_nine_admin_header_callback',
'default-text-color' => 'ffffff',
'header-selector' => '.site-header .site-avatar img',
'height' => 224,
'width' => 224,
'wp-head-callback' => '__return_false',
) );
function sixteen_nine_admin_header_callback() {
echo get_header_image() ? '<img src="' . get_header_image() . '" />' : get_avatar( get_option( 'admin_email' ), 224 );
}
//* 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