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/5211317 to your computer and use it in GitHub Desktop.
Save braddalton/5211317 to your computer and use it in GitHub Desktop.
genesis_register_sidebar( array(
'id' => 'before-content',
'name' => __( 'WP Sites Custom Widget', 'crystal' ),
'description' => __( 'This is the before-content section.', 'crystal' ),
) );
add_action( 'genesis_after_header', 'custom_before_content', 9 );
function custom_before_content() {
if ( is_home() && is_active_sidebar( 'before-content' ) ) {
echo '<div class="before-content"><div class="wrap">';
dynamic_sidebar( 'before-content' );
echo '</div></div>';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment