Skip to content

Instantly share code, notes, and snippets.

@WebEndevSnippets
Last active December 22, 2015 23:09
Show Gist options
  • Save WebEndevSnippets/6544898 to your computer and use it in GitHub Desktop.
Save WebEndevSnippets/6544898 to your computer and use it in GitHub Desktop.
Genesis: Add Image to Header Instead of background image (responsive).
add_filter( 'genesis_seo_title', 'webendev_add_logo_image_header', 10, 2 );
/**
* Filter the genesis_seo_site_title to use an image for the logo instead of a background image.
* This will allow full width logos to be reponsive. Requires CSS header width of 100%, and
* no min-height in header.
*
*/
function webendev_add_logo_image_header( $title, $inside ){
$child_inside = sprintf( '<a href="%s" title="%s"><img src="'. get_stylesheet_directory_uri() .'/images/StreetSyleDogs_Logo_980x226.jpg" title="%s" alt="%s"/></a>', trailingslashit( home_url() ), esc_attr( get_bloginfo( 'name' ) ), esc_attr( get_bloginfo( 'name' ) ), esc_attr( get_bloginfo( 'name' ) ) );
$title = str_replace( $inside, $child_inside, $title );
return $title;
}
/** Remove Site Description */
remove_action( 'genesis_site_description', 'genesis_seo_site_description' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment