Skip to content

Instantly share code, notes, and snippets.

@deeman
Created August 15, 2020 12:04
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 deeman/86d8274ceb9dd7b983ac352ac1e79caa to your computer and use it in GitHub Desktop.
Save deeman/86d8274ceb9dd7b983ac352ac1e79caa to your computer and use it in GitHub Desktop.
Genesis Framework - Widget Area Before Content
// Registers Widget Area Before Content
genesis_register_sidebar( array(
'id' => 'widget-before-content',
'name' => __( 'Widget Before Content', 'genesis' ),
'description' => __( 'Displays Content Before All Single Posts.', 'genesis' ),
) );
//LOCATION
add_action( 'genesis_after_header', 'wv_widget_location_before_content' );
function wv_widget_location_before_content () {
genesis_widget_area( 'widget-before-content', array(
'before' => '<div class=" widget-before-content" class="custom-widget-area"><div class="wrap">',
'after' => '</div></div>',
) );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment