Last active
December 17, 2015 11:29
-
-
Save braddalton/5602218 to your computer and use it in GitHub Desktop.
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
/** Register Before Content Widget**/ | |
genesis_register_sidebar( array( | |
'id' => 'home-slider', | |
'name' => __( 'Home Slider Widget', 'wpsites' ), | |
'description' => __( 'Add Your Slider Widget Here Susanna.', 'wpsites' ), | |
) ); | |
/** | |
* @author Brad Dalton - WP Sites | |
* @learn more http://wp.me/p1lTu0-9Wx | |
*/ | |
/** Hook Widget Before Content*/ | |
add_action( 'genesis_before_content_sidebar_wrap', 'wpsites_home_slider_widget', 5 ); | |
function wpsites_home_slider_widget() { | |
if ( is_home() ) { | |
echo '<div class="home-slider">'; | |
dynamic_sidebar( 'home-slider' ); | |
echo '</div><!-- end .home-slider -->'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment