Skip to content

Instantly share code, notes, and snippets.

@nickdavis
Created February 12, 2016 13:45
Show Gist options
  • Save nickdavis/953bff7114ade409fcb5 to your computer and use it in GitHub Desktop.
Save nickdavis/953bff7114ade409fcb5 to your computer and use it in GitHub Desktop.
Allow a custom background on Posts in the Kickstart Pro theme (http://docs.leanthemes.co/article/31-kickstart-customise-custom-background-posts)
<?php
/**
* Kickstart Pro
*
* @author Lean Themes
* @license GPL-2.0+
* @link http://demo.leanthemes.co/kickstart/
*/
add_action( 'genesis_after_header', 'kickstart_page_before' );
// Add before content section
function kickstart_page_before() {
// If a Featured Image is set for this page, create the background div
if ( has_post_thumbnail() ) {
echo '<div class="before-content"></div>';
}
}
genesis();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment