Skip to content

Instantly share code, notes, and snippets.

@braddalton
Created May 21, 2016 11:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save braddalton/f35ed35748c738414554bd11c31f5603 to your computer and use it in GitHub Desktop.
Save braddalton/f35ed35748c738414554bd11c31f5603 to your computer and use it in GitHub Desktop.
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