I am trying to display all custom fields for each post in a query with the example provided here:
http://www.advancedcustomfields.com/resources/get_field_objects/
/*
* 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>';
}
}
However, I am getting an error for Post Object fields:
Catchable fatal error: Object of class WP_Term could not be converted to string