Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Filter the Genesis 2.0 SEO title to remove the H1 tag and implement the Organization/Logo schema.
//* Do NOT include the opening php tag
//* Add Organization schema to our logo
//* Note that logo location is not inside WordPress. It's in a folder named 'img' off of the root of website.
add_filter( 'genesis_seo_title', 'b3m_header_title', 10, 3 );
function b3m_header_title( $title, $inside, $wrap ) {
$inside = sprintf( '<div itemscope="itemscope" itemtype=""><a itemprop="url" href="%s" title="%s"><img class="logo" itemprop="logo" src="" alt="%s" /></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
You can’t perform that action at this time.