Last active
December 18, 2015 03:39
-
-
Save braddalton/5719755 to your computer and use it in GitHub Desktop.
This file contains hidden or 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-slider', | |
'name' => __( 'Home Slider', 'prose' ), | |
'description' => __( 'This is the slider widget area for your homepage.', 'prose' ), | |
) ); | |
/** | |
* @author Brad Dalton - WP Sites | |
* @example http://wp.me/p1lTu0-9P2 | |
*/ | |
add_action( 'genesis_before_content_sidebar_wrap', 'widget_before_content_sidebar_wrap'); | |
function widget_before_content_sidebar_wrap() { | |
if ( is_home() && is_active_sidebar( 'home-slider' ) ) { | |
genesis_widget_area( 'home-slider', array( | |
'before' => '<div class="home-slider" class="widget-area">', | |
'after' => '</div>', | |
) ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment