
Hi,
I’m trying to check for all the fields in a group and wether they are empty or not. I also want to load them dynamically and do not want to call them “manually” in the code using the “get_field(‘my_field_name’)” command.
Basically, i want to show different groups of fields on the pages i want. For example, a first “author” group would show the author image and name (i use a yes/no checkbox field to check for this one). A second group would be “Informations” which would have “sub-groups” like “Address”, “Phone Number”, “Opening hours” etc.
I want to keep the ability to add custom fields in each group in the future.
So here is my question: Is there any way to check for the fields in a group. If none of them are filled do not show the section. If at least one of them is filled, show the Section name and dynamically show the sub-group title and the field that is filled without calling the get_field() function with the specific name of that field.
If you have any solution to this question, i’m all ears (even if it includes another plugin).
Thank you in advance!