Last active
December 15, 2015 15:39
-
-
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.
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 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