Last active
March 26, 2018 20:47
-
-
Save adambradford/10be240ef88748009e1ff9ecb6597c21 to your computer and use it in GitHub Desktop.
Add Before Footer widget area in a WordPress site built with the Genesis Framework
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
<?php | |
//* Add this to your functions.php file. Do NOT include the opening php tag | |
//* Add a Before Footer widget area | |
genesis_register_sidebar( array( | |
'id' => 'before-footer', | |
'name' => __( 'Before Footer' ), | |
'description' => __( 'This is the area just above the footer', 'genesis' ), | |
) ); | |
add_action( 'genesis_before_footer', 'before_footer_widget_area', 5 ); | |
function before_footer_widget_area() { | |
genesis_widget_area( 'before-footer', array( | |
'before' => '<div class="before-footer">', | |
'after' => '</div>', | |
) ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment