Last active
August 29, 2015 14:13
-
-
Save jdspiral/2d25c7023e196d3ebb5f to your computer and use it in GitHub Desktop.
Add logo to header and remove h1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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