Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

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

#253178
Atelierbram
Participant

Using frameworks for WordPress makes these things a bit harder, for me in my mind that is, because it adds this extra layer of abstraction. So ISO editing a template file, one is filtering functions in functions.php, … a matter of preference?

First checking if something is “set” with a conditional statement before applying some code seems to be the sensible way to prevent unnecessary output.