Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Register a home widget in Genesis and unregister unused areas and layouts
//* Unregister widgets areas & layouts
unregister_sidebar( 'sidebar-alt' );
genesis_unregister_layout( 'content-sidebar-sidebar' );
genesis_unregister_layout( 'sidebar-sidebar-content' );
genesis_unregister_layout( 'sidebar-content-sidebar' );
//* Register Home Slider widget area
genesis_register_sidebar( array(
'id' => 'home-slider',
'name' => 'Home Slider',
'description' => 'This is the home slider section'
) );
add_action( 'genesis_after_header', 'sk_home_featured' );
function sk_home_featured() {
genesis_widget_area( 'home-slider', array(
'before' => '<div class="home-slider widget-area">',
'after' => '</div>',
) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment