Skip to content

Instantly share code, notes, and snippets.

@nickdavis
Created May 13, 2016 12:16
Show Gist options
  • Save nickdavis/295d1fe82af9e2aa2722873e29786fe8 to your computer and use it in GitHub Desktop.
Save nickdavis/295d1fe82af9e2aa2722873e29786fe8 to your computer and use it in GitHub Desktop.
CSS that should be used in conjunction with template-unstretch.php (below) on the Kickstart Pro theme by Lean Themes. Please note we cannot provide support for customisations.
.page-template-template-unstretch .before-content-unstretch {
margin-bottom: -124px;
position: relative;
text-align: center;
top: -116px;
}
@media only screen and (max-width: 900px) {
.page-template-template-unstretch .before-content-unstretch {
margin-bottom: -8px;
top: 0;
}
}
<?php
/**
* Kickstart Pro
*
* @author Lean Themes
* @license GPL-2.0+
* @link http://demo.leanthemes.co/kickstart/
*/
// Template Name: Unstretch
add_action( 'genesis_after_header', 'kickstart_page_before_unstretch' );
// Add before content section
function kickstart_page_before_unstretch() {
// If a Featured Image is set for this page, create the background div
if ( has_post_thumbnail() ) {
echo '<div class="before-content-unstretch">';
the_post_thumbnail();
echo '</div>';
}
}
genesis();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment