I’ve registered a new field group using the
acf_add_local_field_group function – however I can’t access the Field Group via the back-end to find the Field Group ID. I need to be able to loop through the Field Group to print out the individual fields, as there are 100+ of them.
Any other way of grabbing the Field Group ID? I’ve thought of querying the database, but hoping for a cleaner method.
A field group registered locally does not have an ID and is not stored in the database. The ID is the post ID of the field group.
How are you trying to get this field group by the ID?
Try using the group key.
Thanks for your reply.
I have now solved this issue. As I was trying to access fields associated with a post, I used the ACF
get_fields function, using the Post ID as a parameter. Posted my snippet below for anyone interested.
$singleFields = get_fields($postID);
foreach( $singleFields as $name => $value ) :
<?php endforeach; ?>