Last active
October 18, 2017 06:44
-
-
Save JeffCleverley/957d1f64ad5cc3dc74f2633b21e9c522 to your computer and use it in GitHub Desktop.
Genesis Hidden Footer
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_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', | |
] ); | |
} |
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 | |
//* 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' ), | |
] ); |
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
.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