Last active
August 29, 2015 13:59
-
-
Save michaelcarwile/10923908 to your computer and use it in GitHub Desktop.
Featured image check if featured image exists and place on theme for WordPress Genesis child theme.
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 | |
//* don't copy opening php tag above | |
//* Add featured image to top of posts | |
add_action('genesis_before_entry', 'featured_post_image', 8); | |
function featured_post_image() { | |
if (has_post_thumbnail()) : ?> | |
<div class="featured-image"> | |
<?php the_post_thumbnail('post-image'); ?> | |
</div> | |
<?php endif; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment