Skip to content

Instantly share code, notes, and snippets.

@QROkes
Created January 17, 2016 15:09
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 QROkes/2be170c2df216eca28b8 to your computer and use it in GitHub Desktop.
Save QROkes/2be170c2df216eca28b8 to your computer and use it in GitHub Desktop.
Custom header CSS Style (Wordpress & Genesis Framework)
/** Fix header image aligment
add_theme_support( 'genesis-custom-header', array( 'width' => 396, 'height' => 120 ) );
remove_action( 'wp_head', 'genesis_custom_header_style' );
function qr_custom_header() {
$header_image = get_header_image();
$output .= sprintf( '%s { background: url(%s) center no-repeat !important; }', genesis_html5() ? '.title-area' : '#header', esc_url( $header_image ) );
printf( '<style type="text/css">%s</style>' . "\n", $output );
}
add_action( 'wp_head','qr_custom_header' ); */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment