Skip to content

Instantly share code, notes, and snippets.

@adambradford
Last active March 26, 2018 20:47
Show Gist options
  • Save adambradford/10be240ef88748009e1ff9ecb6597c21 to your computer and use it in GitHub Desktop.
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
<?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