Skip to content

Instantly share code, notes, and snippets.

@braddalton
Created March 15, 2013 01:00
Show Gist options
  • Save braddalton/5166697 to your computer and use it in GitHub Desktop.
Save braddalton/5166697 to your computer and use it in GitHub Desktop.
Paste this code at the end of the Prose child themes init.php file.
genesis_register_sidebar( array(
'id' => 'home-slider',
'name' => __( 'Home Slider', 'prose' ),
'description' => __( 'This is the slider widget area for your homepage.', 'prose' ),
) );
add_action( 'genesis_before_content_sidebar_wrap', 'child_before_content_sidebar_wrap');
function child_before_content_sidebar_wrap'() {
if ( is_home() && is_active_sidebar( 'home-slider' ) ) {
echo '<div id="home-slider">';
dynamic_sidebar( 'home-slider' );
echo '</div><!-- end #home-slider -->';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment