Featured image outside the loop
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
<!-- Place this in (for example,) a widget to show featured image attached for that content type (Post or Page or CPT etc.): -->
<?php
global $post;
if (has_post_thumbnail( $post->ID ) ) {
echo get_the_post_thumbnail($post->ID);
}
?>