I want to display a custom field we have [using the Estatik wordpress real estate plugin] if the database field has a value and hide that if it is empty. I can get the field to display and hide if empty or filled out, but, I cannot display the text: "Year built" when the year is filled out:
<?php if( es_the_property_field('year-built1594411179f5f08c8ab6ff14') ): ?>
<p>Year built: <?php es_the_property_field('year-built1594411179f5f08c8ab6ff14'); ?></p>
<?php endif; ?>
What can i change the code above to achieve:
If the year is filled out, I'd like it to display: Year built: 1994
If the year is left empty, i'd like the paragraph to not print at all
thanks in advance!
Aucun commentaire:
Enregistrer un commentaire