I have three field groups, named General Specifications, Standard Features, and Optional Extras.
In my code, I want to specify one field group at a time and output its field labels and values using the code below.
I don’t know how to select one field group at a time in my code – that’s where I’m getting stuck :/
<?php
$fields = get_field_objects();
if( $fields )
{
foreach( $fields as $field_name => $field )
{
echo '<li>';
echo $field['label'] . ": ";
echo $field['value'];
echo '</li>';
}
}
?>