Advanced Custom Fields – display label and value only if value entered
You have a mismatch in your PHP tags. Use this: <?php $field_name = “text_field”; $field = get_field_object($field_name); ?> <table> <tbody> <?php if( isset($field[‘value’] ): ?> <tr> <th><?php echo $field[‘label’]; ?></th> <td><?php echo $field[‘value’]; ?></td> </tr> <?php endif; ?> </tbody> </table>