Created
May 21, 2016 11:15
-
-
Save braddalton/f35ed35748c738414554bd11c31f5603 to your computer and use it in GitHub Desktop.
This file contains 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
add_action( 'genesis_before_header', 'your_function' ); | |
function your_function() { | |
if ( get_theme_mod( 'themeslug_logo' ) ) : ?> | |
<div class='site-logo'> | |
<a href='<?php echo esc_url( home_url( '/' ) ); ?>' title='<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>' rel='home'><img src='<?php echo esc_url( get_theme_mod( 'themeslug_logo' ) ); ?>' alt='<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>'></a> | |
</div> | |
<?php else : ?> | |
<hgroup> | |
<h1 class='site-title'><a href='<?php echo esc_url( home_url( '/' ) ); ?>' title='<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>' rel='home'><?php bloginfo( 'name' ); ?></a></h1> | |
<h2 class='site-description'><?php bloginfo( 'description' ); ?></h2> | |
</hgroup> | |
<?php endif; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment