Support

Account

Home Forums Front-end Issues Hide field if empty Reply To: Hide field if empty

  • I do not see “if” conditional there. Something like this, cannot test now.

    <?php if( get_field('youtube') ): ?>
    <?php 
    $field_name = ( ‘youtube’ );
    $field = get_field_object($field_name);
    echo $field[‘label’] . ‘: ‘ . $field[‘value’]; ?> <br>
    ?>
    <?php endif; ?>