Last active
January 4, 2020 05:01
-
-
Save braddalton/ff9d99f921549ec04456b6008831ef62 to your computer and use it in GitHub Desktop.
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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