JiveDig
7/17/2013 - 1:39 PM

Replace site title with an inline logo in Genesis 2.0 with HTML5

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>';
			
	}

}