-
-
Save anonymous/9ec62bb36d2e5ef4688f 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 Home Slider Widget**/ | |
genesis_register_sidebar( array( | |
'id' => 'home-slider', | |
'name' => __( 'Home Slider', 'wpsites' ), | |
'description' => __( 'Add Slider Before Content Home Page.', 'wpsites' ), | |
) ); | |
/** | |
* @author Brad Dalton - WP Sites | |
* @link http://wp.me/p1lTu0-9Wx | |
*/ | |
/** Hook Widget Before Content*/ | |
add_action( 'genesis_before_content_sidebar_wrap', 'home_slider_widget_area', 5 ); | |
function wpsites_before_content_home_widget() { | |
if ( is_home() ) { | |
echo '<div class="before-content">'; | |
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