Show attributes only when filled (with a if statement?) 5.6
Permalink
Hi, Is it possible to display some html output only when the attribute is filled? Let's say a Facebook event button that only shows on the page if there is a link filled in the probities of the page with a attribute called 'facebook_event'? So something like this
How can I set it so it will check of the attribute is filled or isn't blank?
<?php if ($facebook_event): ?> <a class="bttn" href="<?php echo $facebook_event ?>" target="_blank">Check this event</a> <?php endif; ?>
How can I set it so it will check of the attribute is filled or isn't blank?