Skip to content

Instantly share code, notes, and snippets.

@braddalton
Last active December 14, 2015 07:08
Show Gist options
  • Save braddalton/5047932 to your computer and use it in GitHub Desktop.
Save braddalton/5047932 to your computer and use it in GitHub Desktop.
Add Home Page Widget Area For Slider Using The Prose Child Theme
genesis_register_sidebar( array(
'id' => 'home-slider',
'name' => __( 'Home Slider', 'prose' ),
'description' => __( 'This is the slider section of the homepage.', 'prose' ),
) );
/**
* @author Brad Dalton - WP Sites
* @link http://wpsites.net/web-design/home-page-slider-prose-theme/
*/
add_action( 'genesis_before_content_sidebar_wrap', 'child_before_post_box' );
function child_before_post_box() {
if ( is_home() && is_active_sidebar( 'home-slider' ) ) {
echo '<div id="home-slider">';
dynamic_sidebar( 'home-slider' );
echo '</div><!-- end #home-slider -->';
}
}
// Add this code to the end of the Prose child theme's /lib/init.php file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment