Skip to content

Instantly share code, notes, and snippets.

@braddalton
Last active Jan 4, 2020
Embed
What would you like to do?
Step 2 - Conditionally Add New Widget Area Before Footer Widgets In Genesis https://wpsites.net/web-design/add-new-widget-area-before-footer-widgets-in-genesis/#step-2
genesis_register_sidebar( array(
'id' => 'before-footer',
'name' => __( 'Before Footer' ),
) );
add_action( 'genesis_before_footer', 'before_footer_widget_area', 5 );
function before_footer_widget_area() {
if ( ! is_front_page() )
return;
genesis_widget_area( 'before-footer', array(
'before' => '<div class="before-footer"><div class="wrap">',
'after' => '</div></div>',
) );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment