Skip to content

Instantly share code, notes, and snippets.

@braddalton
Last active December 18, 2015 03:39
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save braddalton/5719755 to your computer and use it in GitHub Desktop.
genesis_register_sidebar( array(
'id' => 'home-slider',
'name' => __( 'Home Slider', 'prose' ),
'description' => __( 'This is the slider widget area for your homepage.', 'prose' ),
) );
/**
* @author Brad Dalton - WP Sites
* @example http://wp.me/p1lTu0-9P2
*/
add_action( 'genesis_before_content_sidebar_wrap', 'widget_before_content_sidebar_wrap');
function widget_before_content_sidebar_wrap() {
if ( is_home() && is_active_sidebar( 'home-slider' ) ) {
genesis_widget_area( 'home-slider', array(
'before' => '<div class="home-slider" class="widget-area">',
'after' => '</div>',
) );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment