Support

Account

Home Forums Front-end Issues Fields show "Array" on front-end

Unread

Fields show "Array" on front-end

  • I inserted this code to display on product pages: woocomerce/templates/single-product/meta.php

    <?php
    $fields = get_field_objects();
    if( $fields ): ?>

      <?php foreach( $fields as $field ): ?>

    • <?php echo $field[‘label’]; ?>: <?php echo $field[‘value’]; ?>
    • <?php endforeach; ?>

    <?php endif; ?>

    Any value put in, it shows as Array on the front-end instead of the correct filled in item. Thanks for any help.

Viewing 1 post (of 1 total)

The topic ‘Fields show "Array" on front-end’ is closed to new replies.