Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Register and display a new widget area in Genesis. Source:
//* Register After Post widget area
genesis_register_sidebar( array(
'id' => 'after-post',
'name' => __( 'After Post', 'themename' ),
'description' => __( 'This is a widget area that can be placed after the post', 'themename' ),
) );
//* Hook After Post widget area after post content
add_action( 'genesis_entry_footer', 'customprefix_after_post_widget' );
function customprefix_after_post_widget() {
if ( is_singular( 'post' ) ) {
genesis_widget_area( 'after-post', array(
'before' => '<div class="after-post widget-area">',
'after' => '</div>',
) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment