Instantly share code, notes, and snippets.

Embed
What would you like to do?
Genesis Hidden Footer
<?php
add_action( 'genesis_after', 'learning_curve_footer_widget' );
/**
* Add markup for hidden footer widget area.
*/
function learning_curve_footer_widget() {
genesis_widget_area( 'hidden-footer', [
'before' => '<footer class="hidden-footer widget-area" itemscope itemtype="https://schema.org/WPFooter"><div class="wrap">',
'after' => '</div></footer',
] );
}
<?php
//* Register widget area for hidden footer.
genesis_register_sidebar( [
'id' => 'hidden-footer',
'name' => __( 'Hidden Footer', 'Learning Curve' ),
'description' => __( 'The widget for the hidden footer ', 'Learning Curve' ),
] );
.site-container {
background-color: #fff;
}
.hidden-footer {
background-color: #141B28;
color: #fff;
padding: 60px 0;
text-align: center;
}
@media only screen and (min-width: 1024px) {
.site-container.added-hidden-footer-margin {
position: relative;
z-index: 1;
}
.site-container.added-hidden-footer-margin + .hidden-footer {
bottom: 0;
left: 0;
position: fixed;
right: 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment