Skip to content

Instantly share code, notes, and snippets.

@braddalton
Last active December 15, 2015 15:59
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/5285591 to your computer and use it in GitHub Desktop.
Save braddalton/5285591 to your computer and use it in GitHub Desktop.
genesis_register_sidebar( array(
'id' => 'featured-box',
'name' => __( 'Featured Box', 'child' ),
'description' => __( 'This is the featured box.', 'child' ),
) );
/**
* @author Brad Dalton - WP Sites
* @example http://wpsites.net/web-design/feature-box-genesis-home-page/
*/
add_action( 'genesis_after_header', 'genesis_featured_box' );
function genesis_featured_box() {
if ( is_front_page() && is_active_sidebar( 'featured-box' ) ) {
genesis_widget_area( 'featured-box', array(
'before' => '<div class="featured-box widget-area">',
'after' => '</div>',
) );
}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment