pierrebalian of Rocket55 Web Team
12/21/2016 - 6:53 PM

Only Display a block of code if post thumbnail is set

Only Display a block of code if post thumbnail is set

<?php if ( has_post_thumbnail() ) { ?>

<div class="YOUR CLASS">
	<?php echo get_the_post_thumbnail($post->ID,$size = 'YOURSIZE'); ?>
</div>

<?php } ?>