Displaying a custom field with a conditional statement
Description
This code will display an advanced custom field using the ACF plugin. using an if, else statement
PHP Source Code
<!--custom field-->
<?php if (get_field('event_start_time')): ?>
<?php $event_start_time = get_field('event_start_time'); ?>
<?php echo esc_html($event_start_time); ?>
<?php else : ?>
TBD
<?php endif; ?>
<!--custom field-->