Skip to content

Instantly share code, notes, and snippets.

@JiveDig
Created July 17, 2013 13:39
Show Gist options
  • Save JiveDig/6020630 to your computer and use it in GitHub Desktop.
Save JiveDig/6020630 to your computer and use it in GitHub Desktop.
Replace site title with an inline logo in Genesis 2.0 with HTML5
// Requires Genesis 2.0 with HTML5
// Replace site title with an inline logo
remove_action( 'genesis_site_title', 'genesis_seo_site_title' );
add_action( 'genesis_site_title', 'child_do_logo' );
function child_do_logo() {
$site_url = site_url();
$blog_title = get_bloginfo();
if( is_front_page() OR is_home() ) {
echo '<h1 class="site-title" itemprop="name">';
echo '<meta itemprop="logo" content="' . $site_url . '/wp-content/images/logo.png">';
echo '<a itemprop="url" href="' . $site_url . '" title="' . $blog_title . '">' . $blog_title . '</a>';
echo '</h1>';
} else {
echo '<p class="site-title" itemprop="name">';
echo '<meta itemprop="logo" content="' . $site_url . '/wp-content/images/logo.png">';
echo '<a itemprop="url" href="' . $site_url . '" title="' . $blog_title . '">' . $blog_title . '</a>';
echo '</p>';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment