Created
April 29, 2013 14:58
-
-
Save rezzz-dev/5482134 to your computer and use it in GitHub Desktop.
Snippet: WP: Detect Image for Singular
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 | |
// Check if this is a post or page, if it has a thumbnail, and if it's a big one | |
if ( is_singular() && has_post_thumbnail( $post->ID ) ) : | |
// Houston, we have a new header image! | |
echo get_the_post_thumbnail( $post->ID, 'full' ); | |
endif; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment