Last active
November 22, 2018 07:34
-
-
Save srikat/046a3b9c5b0f8d9dc326 to your computer and use it in GitHub Desktop.
Sticky/Fixed footer in Genesis. http://sridharkatakam.com/push-footer-way-theres-little-content-genesis/
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
// Move Footer widgets and Footer outside Site Container | |
// Reposition the footer widgets | |
remove_action( 'genesis_before_footer', 'genesis_footer_widget_areas' ); | |
add_action( 'genesis_after', 'genesis_footer_widget_areas' ); | |
// Reposition the footer | |
remove_action( 'genesis_footer', 'genesis_footer_markup_open', 5 ); | |
remove_action( 'genesis_footer', 'genesis_do_footer' ); | |
remove_action( 'genesis_footer', 'genesis_footer_markup_close', 15 ); | |
add_action( 'genesis_after', 'genesis_footer_markup_open', 11 ); | |
add_action( 'genesis_after', 'genesis_do_footer', 12 ); | |
add_action( 'genesis_after', 'genesis_footer_markup_close', 13 ); | |
// Enqueue scripts | |
add_action( 'wp_enqueue_scripts', 'sk_sticky_footer' ); | |
function sk_sticky_footer() { | |
wp_enqueue_script( 'sticky-footer', get_stylesheet_directory_uri() . '/js/sticky-footer.js', array( 'jquery' ), '1.0.0' ); | |
} |
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
.sticky.site-footer { | |
width: 100%; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment