Stick Elementor footer to bottom
-
Hello,
Yesterday I gave a try to Kadence… It looks great and wanted to do the switch but couldn’t find a way to adapt the “function” I use in the Astra child theme to stick the “Elementor” footer to the bottom of the page.
Any help would be great and here’s the function used… Just in case:
/** FOOTER STICK TO BOTTOM */
add_action( ‘wp_footer’, ‘astra_footer_align_bottom’ );
function astra_footer_align_bottom () {
?>
<script type=”text/javascript”>
document.addEventListener(
“DOMContentLoaded”,
function() {
fullHeight();
},
false
);
function fullHeight() {
var headerHeight = document.querySelector(“header”).clientHeight;
var footerHeight = document.querySelector(“footer”).clientHeight;
var headerFooter = headerHeight + footerHeight;
var content = document.querySelector(“#content”);
content.style.minHeight = “calc( 100vh – ” + headerFooter + “px )”;
}
</script>
<?php
}Cheers,
Jacques.
The page I need help with: [log in to see the link]
- The topic ‘Stick Elementor footer to bottom’ is closed to new replies.