Created
February 12, 2016 13:45
-
-
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)
This file contains hidden or 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 | |
/** | |
* 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