Skip to content

Instantly share code, notes, and snippets.

@braddalton
Created February 28, 2013 22:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save braddalton/5060622 to your computer and use it in GitHub Desktop.
Save braddalton/5060622 to your computer and use it in GitHub Desktop.
Adds a full width widget area to the home page of Genesis child themes.
genesis_register_sidebar( array(
'id' => 'home-custom',
'name' => __( 'Home Slider', 'magazine' ),
'description' => __( 'This is the slider widget area for your homepage.', 'magazine' ),
) );
add_action( 'genesis_before_content_sidebar_wrap', 'child_before_content');
function child_before_content() {
if ( is_home() ) {
echo '<div id="home-custom">';
dynamic_sidebar( 'home-custom' );
echo '</div><!-- end #home-custom -->';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment