Skip to content

Instantly share code, notes, and snippets.

@GaryJones
Forked from rickrduncan/schema-logo.php
Created August 19, 2013 09:16
Show Gist options
  • Save GaryJones/6267219 to your computer and use it in GitHub Desktop.
Save GaryJones/6267219 to your computer and use it in GitHub Desktop.
<?php
//* Do NOT include the opening php tag
//* Add Organization schema to our logo
add_filter( 'genesis_seo_title', 'rvam_header_title', 10, 3 );
function rvam_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="http://www.rvamedia.com/img/rva-media.png" 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