Skip to content

Instantly share code, notes, and snippets.

@braddalton
Last active Jan 16, 2020
Embed
What would you like to do?
Show Hide Different Widgets On Desktop & Mobile Screens Step 1 https://wpsites.net/web-design/show-hide-different-widgets-on-desktop-mobile-screens/#step-1
genesis_register_sidebar( array(
'id' => 'before-header',
'name' => __( 'Before Header', 'genesis-sample' ),
'description' => __( 'Before Header Widget Area Site Wide', 'genesis-sample' ),
) );
add_action( 'genesis_before_header', 'add_widget_before_header', 5 );
function add_widget_before_header() {
if ( is_active_sidebar('before-header') ) {
genesis_widget_area( 'before-header', array(
'before' => '<div class="before-header" class="widget-area">',
'after' => '</div>',
) );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment