Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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