Skip to content

Instantly share code, notes, and snippets.

@braddalton
Last active December 17, 2015 02:49
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/5539151 to your computer and use it in GitHub Desktop.
Save braddalton/5539151 to your computer and use it in GitHub Desktop.
// Register full-width content widget
genesis_register_sidebar( array(
'id' => 'full-content',
'name' => __( 'Full Content', 'child' ),
'description' => __( 'This is the full-width content section.', 'child' ),
) );
/**
* Author Brad Dalton
* @link http://wpsites.net/
*/
// Display Widget Content After Header Home Page Only
function wpsites_full_width_content() {
if ( is_home() && is_active_sidebar( 'full-content' ) ) {
echo '<div id="full-content">';
dynamic_sidebar( 'full-content' );
echo '</div><!-- end #full-content -->';
}
}
add_action ( 'genesis_after_header', 'wpsites_full_width_content' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment