Last active
December 17, 2015 05:09
-
-
Save JiveDig/5555955 to your computer and use it in GitHub Desktop.
Replace site title with an inline logo
This file contains hidden or 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
// 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(); | |
if( is_front_page() OR is_home() ) { | |
echo '<h1 class="site-logo" itemprop="logo"><a href="' . $site_url . '"><img src="/wp-content/images/logo.png"></a></h1>'; | |
} else { | |
echo '<p class="site-logo" itemprop="logo"><a href="' . $site_url . '"><img src="/wp-content/images/logo.png"></a></p>'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment