Skip to content

Instantly share code, notes, and snippets.

@cdils
Created March 7, 2014 22:31
Show Gist options
  • Save cdils/9421580 to your computer and use it in GitHub Desktop.
Save cdils/9421580 to your computer and use it in GitHub Desktop.
Code hijack from Genesis Framework functions/header.php genesis_do_header function.
<?php //ditch this entire line
remove_action( 'genesis_header', 'genesis_do_header' );
remove_action( 'genesis_header', 'brainfartin_do_header' );
function brainfartin_do_header() {
global $wp_registered_sidebars;
genesis_markup( array(
'html5' => '<div %s>',
'xhtml' => '<div id="title-area">',
'context' => 'title-area',
) );
do_action( 'genesis_site_title' );
do_action( 'genesis_site_description' );
echo '</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' );
add_action( 'portable_social_nav' );
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