This should do it. I can’t test it right now.
I used the genesis_header_markup_open()
and the genesis_header_markup_open()
Genesis functions and renamed them wpse_121660_header_markup_open()
and wpse_121660_header_markup_close()
. Then called them instead of the Genesis functions and added your new <div>
in them.
/** Reposition header outside main wrap */
remove_action( 'genesis_header', 'genesis_header_markup_open', 5 );
remove_action( 'genesis_header', 'genesis_do_header' );
remove_action( 'genesis_header', 'genesis_header_markup_close', 15 ) ;
add_filter( 'genesis_before', 'wpse_121660_header_markup_open', 5 );
add_action( 'genesis_before', 'genesis_do_header' );
add_filter( 'genesis_before', 'wpse_121660_header_markup_close', 15 );
/** Reposition header outside main wrap */
remove_action('genesis_after_header','genesis_do_nav');
add_action('genesis_before','genesis_do_nav');
/**
* Echo the closing structural markup for the header.
*
* @uses genesis_structural_wrap() Maybe add closing .wrap div tag with header context.
* @uses genesis_markup() Apply contextual markup.
*/
function wpse_121660_header_markup_close() {
genesis_structural_wrap( 'header', 'close' );
genesis_markup( array(
'html5' => '</header></div>',
'xhtml' => '</div></div>',
) );
}
/**
* Echo the opening structural markup for the header.
*
* @uses genesis_markup() Apply contextual markup.
* @uses genesis_structural_wrap() Maybe add opening .wrap div tag with header context.
*/
function wpse_121660_header_markup_open() {
genesis_markup( array(
'html5' => '<div class="hwrapper"><header %s>',
'xhtml' => '<div class="hwrapper"><div id="header">',
'context' => 'site-header',
) );
genesis_structural_wrap( 'header' );
}