Support

Account

Home Forums Front-end Issues Hiding empty fields Reply To: Hiding empty fields

  • Hi @Cheyens

    The get_field_object function will also load in the value, so there is no need to use the_field as well.

    Here is the complete code:

    
    <?php $field = get_field_object('titel' ); ?>
    
    <?php if( $field['value'] ): ?>
    	<b><?php echo $field['label']; ?>: </b><?php echo $field['value']; ?><br/>
    <?php endif; ?>