Support

Account

Home Forums General Issues Field Group

Solving

Field Group

  • is there any function to get the field group name ? i didnt saw anything into function doc neither in var_dump(get_field_object(‘AnyID’));

  • A field does not store information like this about the field group it is in, not directly. A field stores the key of its parent. This could be another field or a field group. In the case of a flex field it could also be a layout key. To get the name of the group you would need to get the parent field, this would need to be recursive when dealing with sub fields, and then when you find the group you’d need to get it to extract the name.

  • i finally found this one : “acf_get_field_groups();” to do what i need, just displaying th field group relative to a post.

    but know i’ve a problem with this function, i don’t understand why but fields key return always an empty value

  • in other ways is it possible to get the group key or name from a field ?

  • Maybe it would help to understand why you need to get the field group name that a field is in.

  • to print it into class=”” (for the CSS)

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Field Group’ is closed to new replies.