Support

Account

Home Forums Front-end Issues Show an entire specific field group in frontend Reply To: Show an entire specific field group in frontend

  • This is what worked for me. Hides fields with no value.

    
        <?php $fields = acf_get_fields('123'); ?>
    
        <?php if( $fields )
        { 
    	foreach( $fields as $field )
    	{
    		$value = get_field( $field['name'] );
    
    		if ($value) {
    		
    			echo '<dl>';
                    echo '<dt>' . $field['label'] . '</dt>';
                    echo '<dd>' . $field['value'] . '</dd>';
                echo '</dl>';
    		}
    	} 
    
        } 
        ?>