Support

Account

Home Forums Front-end Issues Displaying all fields in a group Reply To: Displaying all fields in a group

  • Hi @kipmyk I was able to get the values to display with that command so thank you! it’s not pretty and I am sure there are better ways to do it but it works:

    add_action('woocommerce_before_add_to_cart_form', 'speaker_specification_fields', 4 );
    function speaker_specification_fields() { ?>
    
    <?php
    $field = get_field_object('field_6155c03d20d5c');
    ?>
    <?php echo $field['label']; ?>: <?php echo $field['value']; ?>
    
    <?php
    $field = get_field_object('field_61712d2256ff2');
    ?>
    <?php echo $field['label']; ?>: <?php echo $field['value']; ?>
    
    <?php
    $field = get_field_object('field_6155bf1660b3c');
    ?>
    <?php echo $field['label']; ?>: <?php echo $field['value']; ?>
    
    <?php
    $field = get_field_object('field_60d47fd0711ca');
    ?>
    <?php echo $field['label']; ?>: <?php echo $field['value']; ?>
    
    <?php
    $field = get_field_object('field_60d47ffb711cb');
    ?>
    <?php echo $field['label']; ?>: <?php echo $field['value']; ?>
    
    <?php
    $field = get_field_object('field_6155bed832b78');
    ?>
    <?php echo $field['label']; ?>: <?php echo $field['value'];
    }
    ?>

    I just call on every field individually.