Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.