Featured Image in post
<?php if ( has_post_thumbnail() && ! post_password_required() && ! is_attachment() ) : ?> <a class="entry-thumbnail" href="<?php the_permalink(); ?>"> <?php the_post_thumbnail("medium"); ?> </a> <?php endif; ?>