Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save braddalton/5785543 to your computer and use it in GitHub Desktop.
Save braddalton/5785543 to your computer and use it in GitHub Desktop.
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