Skip to content

Instantly share code, notes, and snippets.

@zachbrowne
Created November 9, 2011 22:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zachbrowne/1353253 to your computer and use it in GitHub Desktop.
Save zachbrowne/1353253 to your computer and use it in GitHub Desktop.
Sticky Footers for Thesis Theme on WordPress
html, .custom {
height: 100%;
}
.custom .wrapper {
min-height: 100%;
height: auto !important;
height: 100%;
margin: 0 auto -100px; /* the bottom margin is the negative value of the footer's height */
}
.custom #footer_area, .custom .push {
height: 100px; /* .push must be the same height as .footer */
}
// sticky footer
function div_push() {
?>
<div class="push"></div>
<?php
}
function div_wrapper_start() {
?>
<div class="wrapper">
<?php
}
function div_wrapper_close() {
?>
</div><!--end wrapper-->
<?php
}
add_action('thesis_hook_after_content_area', 'div_push');
add_action('thesis_hook_before_html', 'div_wrapper_start');
add_action('thesis_hook_after_content_area', 'div_wrapper_close');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment