Home › Forums › Other › How to make PHP "if" code to display:none if a featured image is not set › Reply To: How to make PHP "if" code to display:none if a featured image is not set
March 25, 2017 at 10:20 am
#253158
Atelierbram
Participant
Would it be possible for you to edit the single.php
file, or the one with the .featured-images-in-posts
div, and wrap that div within a conditional tag (checking if the thumbnail is set), something like:
<?php if(has_post_thumbnail()): ?><?php endif; ?>
Where the featured-image-in-posts div will be before the endif (can’t format this over here, sorry)