Created
June 14, 2013 21:42
-
-
Save braddalton/5785543 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
genesis_register_sidebar( array( | |
'id' => 'home-custom', | |
'name' => __( 'Custom Home Widget', 'wpsites' ), | |
'description' => __( 'Add Full Width Content On Home Page After Slider', 'wpsites' ), | |
) ); | |
/** | |
* @author Brad Dalton - WP Sites | |
* @learn more http://wp.me/p1lTu0-9Na | |
*/ | |
add_action( 'genesis_before_content', 'wpsites_home_widget', 15 ); | |
function wpsites_home_widget() { | |
if ( is_home() && is_active_sidebar( 'home-custom' ) ) { | |
echo '<div class="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