Last active
May 19, 2016 03:04
-
-
Save ryantownley/617aa2215e930b564b23 to your computer and use it in GitHub Desktop.
This code snippet will add a "Page Header" widget area to your Genesis child theme below the header and outside the wrap. It will show site-wide by default, however, you can use a widget visibility plugin such as included in Jetpack to hide or show the widget in certain areas of your site.
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
//* Register Page Header | |
genesis_register_sidebar( array( | |
'id' => 'page-header', | |
'name' => __( 'Page Header', 'genesis' ), | |
'description' => __( 'This is the Page Header area.', 'Genesis' ), | |
) ); | |
//* Add the Page Header | |
add_action( 'genesis_after_header', 'genesis_page_header' ); | |
function genesis_page_header() { | |
genesis_widget_area( 'page-header', array( | |
'before' => '<div class="page-header">', | |
'after' => '</div>', | |
) ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment