Created
February 28, 2013 22:18
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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