Skip to content

Instantly share code, notes, and snippets.

@braddalton
Last active December 15, 2015 15:39
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/5283843 to your computer and use it in GitHub Desktop.
Save braddalton/5283843 to your computer and use it in GitHub Desktop.
Use this code when using a static page as your home page in the WordPress Reading Settings.
/** Register Featured Box widget area */
genesis_register_sidebar( array(
'id' => 'featured-box',
'name' => __( 'Featured Box', 'genesis' ),
'description' => __( 'This is the featured box.', 'genesis' ),
) );
/** Add Featured Box after header on homepage */
add_action( 'genesis_after_header', 'include_featured_box' );
function include_featured_box() {
if ( is_front_page() && is_active_sidebar( 'featured-box' ) ) {
echo '<div class="featured-box">';
dynamic_sidebar( 'featured-box' );
echo '</div><!-- end .featured-box -->';
}}
//Forked & Modified from http://www.briangardner.com/kickstart-email-list/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment