I added this code:
<?php
/*
* get all custom fields and dump for testing
*/
$fields = get_field_objects();
var_dump( $fields );
/*
* get all custom fields, loop through them and create a label => value markup
*/
$fields = get_field_objects();
if( $fields )
{
foreach( $fields as $field_name => $field )
{
echo '<div>';
echo '<h3>' . $field['label'] . '</h3>';
echo $field['value'];
echo '</div>';
}
}
?>
from http://www.advancedcustomfields.com/resources/get_field_objects/
but, page looks so:
If you please, help me with it.
P.S. The whole single-product.php in attachment
You’re getting Array because they’re not all strings. You can convert those to a string like this:
$fields = get_field_objects();
if( $fields )
{
foreach( $fields as $field_name => $field )
{
echo '<div>';
echo '<h3>' . $field['label'] . '</h3>';
if ( is_array( $field['value'] ) )
{
echo implode( ', ', $field['value'] );
}
else
{
echo $field['value'];
}
echo '</div>';
}
}