Home › Forums › ACF PRO › API/function to retrieve child fields of a layout in a flexible content area? › Reply To: API/function to retrieve child fields of a layout in a flexible content area?
There are some internal functions.
$fields = acf_get_fields($group_key);
will get all the fields in a field group, you can loop through the entire group.
$field = acf_get_field($field_key);
will get a specific field, you can then look in $field['layouts'][$layout_key]['sub_fields'];
I don’t think that there is a function for getting a field’s sub fields.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.