Last active
August 29, 2015 14:05
-
-
Save cosmocanuck/3b023045715f1be29738 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
remove_action( 'genesis_header', 'genesis_do_header' ); | |
add_action( 'genesis_header', 'adam_genesis_do_header' ); | |
function adam_genesis_do_header() { | |
global $wp_registered_sidebars; | |
genesis_markup( array( | |
'html5' => '<div %s>', | |
'xhtml' => '<div id="title-area">', | |
'context' => 'title-area', | |
) ); | |
if ( is_home() ) { | |
echo '<img src="http://www.snapshotscollective.com/wp/wp-content/themes/genesis-child/images/snapshots-title.jpg"></div>'; | |
} else { | |
echo '<img src="http://www.snapshotscollective.com/wp/wp-content/themes/genesis-child/images/snapshots-title-short.jpg"></div>'; | |
} | |
if ( ( isset( $wp_registered_sidebars['header-right'] ) && is_active_sidebar( 'header-right' ) ) || has_action( 'genesis_header_right' ) ) { | |
genesis_markup( array( | |
'html5' => '<aside %s>', | |
'xhtml' => '<div class="widget-area header-widget-area">', | |
'context' => 'header-widget-area', | |
) ); | |
do_action( 'genesis_header_right' ); | |
add_filter( 'wp_nav_menu_args', 'genesis_header_menu_args' ); | |
add_filter( 'wp_nav_menu', 'genesis_header_menu_wrap' ); | |
dynamic_sidebar( 'header-right' ); | |
remove_filter( 'wp_nav_menu_args', 'genesis_header_menu_args' ); | |
remove_filter( 'wp_nav_menu', 'genesis_header_menu_wrap' ); | |
genesis_markup( array( | |
'html5' => '</aside>', | |
'xhtml' => '</div>', | |
) ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment