Last active
April 16, 2019 14:06
-
-
Save srikat/b130b0b280e4cb51cc2e50c7d8ffe5ca to your computer and use it in GitHub Desktop.
How to add a full width element inside Genesis header. https://sridharkatakam.com/add-full-width-element-inside-genesis-header/
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 default header opening markup function | |
remove_action( 'genesis_header', 'genesis_header_markup_open', 5 ); | |
// Add back header opening markup function w/o the structural wrap | |
add_action( 'genesis_header', 'sk_header_markup_open', 5 ); | |
function sk_header_markup_open() { | |
genesis_markup( array( | |
'html5' => '<header %s>', | |
'xhtml' => '<div id="header">', | |
'context' => 'site-header', | |
) ); | |
// genesis_structural_wrap( 'header' ); | |
} | |
// Add toolbar inside header | |
add_action( 'genesis_header', 'sk_toolbar', 7 ); | |
function sk_toolbar() { | |
echo "toolbar code comes here"; | |
// Maybe add opening .wrap div tag with header context. | |
genesis_structural_wrap( 'header' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment