Created
January 25, 2013 20:44
-
-
Save WebEndevSnippets/4637691 to your computer and use it in GitHub Desktop.
Genesis: Replace Header for Custom Logo
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
unregister_sidebar( 'header-right' ); | |
remove_action( 'genesis_header', 'genesis_do_header' ); | |
add_action( 'genesis_header', 'webendev_do_new_header' ); | |
/** | |
* Replace Header to include Custom Logo and Unregister Header Right Sidebar | |
* | |
*/ | |
function webendev_do_new_header() { | |
echo '<div id="site-logo"><a href="' . home_url() .'"><img src="' . get_stylesheet_directory_uri() . '/images/header_logo.png" alt="Site Logo" /></a>'; | |
echo '</div><!-- end #site-logo -->'; | |
if ( has_action( 'genesis_header_right' ) ) { | |
echo '<div class="widget-area">'; | |
do_action( 'genesis_header_right' ); | |
echo '</div><!-- end .widget-area -->'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment