Skip to content

Instantly share code, notes, and snippets.

@jdspiral
Last active August 29, 2015 14:13
Show Gist options
  • Save jdspiral/2d25c7023e196d3ebb5f to your computer and use it in GitHub Desktop.
Save jdspiral/2d25c7023e196d3ebb5f to your computer and use it in GitHub Desktop.
Add logo to header and remove h1
// Remove H1 from title and add logo
add_filter( 'genesis_seo_title', 'jds_header_title', 10, 3 );
function jds_header_title( $title, $inside, $wrap ) {
$inside = sprintf( '<div itemscope="itemscope" itemtype="http://schema.org/Organization"><a itemprop="url" href="%s" title="%s">
<img class="logo" itemprop="logo" src="' . get_stylesheet_directory_uri() . '/images/logo.png" alt="%s" width="" height="" />
</a></div>', trailingslashit( home_url() ), esc_attr( get_bloginfo( 'name' ) ), get_bloginfo( 'name' ) );
return sprintf( '<%1$s id="title">%2$s</%1$s>', 'span', $inside );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment