Hello,
I’m trying to display the values of fields form a certain groupid, but the documentation does not include that option as far as I know.
This is what I tried:
<?php
$group_ID = 19415;
$fields = get_fields($groupID);
$fields = get_field_objects();
?>
<?php if( $fields ): ?>
<?php foreach( $fields as $field ): ?>
<?php if( $field[‘value’] ): ?>
<div class=”listing_detail col-md-6″><?php echo $field[‘label’]; ?>: <?php echo $field[‘value’]; ?></div>
<?php endif; ?>
<?php endforeach; ?>
<?php endif; ?>
The content of custom fields are associated with a post, user, taxonomy term or an options page. The contents of fields are not saved in a way that connects them to the field group.
I’m not talking about the content, I only mean the custom fields labels en variable data it uses.
I found this works: https://dream-encode.com/acf-get-all-fields-in-a-field-group/
Should be in the documentation stuff like that though.
I did not get that from what you asked for.
I’m trying to display the values of fields form a certain groupid