Skip to content

Instantly share code, notes, and snippets.

@rezzz-dev
Created April 29, 2013 14:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rezzz-dev/5482134 to your computer and use it in GitHub Desktop.
Save rezzz-dev/5482134 to your computer and use it in GitHub Desktop.
Snippet: WP: Detect Image for Singular
<?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