nxt_group_definitions() returns every field group registered on the site, with its fields and its location rules. It is how you build something that adapts to whatever groups exist.
What It Does
Each entry carries the group key, its title, its fields and its rules. It is the same data the admin screen reads.
Before You Start
- Nexter Extension is active.
- At least one field group exists.
Iterate the Groups
- Call
nxt_group_definitions().

- Loop the result; each entry is one group.
- Read
key,titleandfieldsfrom each.
- Use
nxt_group_definition()if you want one specific group by key.
Display the Value
Listing every group and its fields:
<?php
foreach ( nxt_group_definitions() as $group ) {
printf( '<h3>%s</h3>', esc_html( $group['title'] ) );
foreach ( $group['fields'] as $field ) {
printf( '<li>%s (%s)</li>',
esc_html( $field['label'] ),
esc_html( $field['type'] ) );
}
}
Limitations
- Returns definitions, not values. To read a value, use
nxt_field_value(). - Results are cached per request and behind the model cache. A definition changed on disk outside the admin may be served stale — see the cache troubleshooting doc.
- This is a read surface. Creating or changing groups goes through the admin or the Content Fields REST routes.
Troubleshooting
A group I just created on the server is missing
The model cache is stale. Clear nxt_model_cache and nxt_ct_definitions_v1 — both, in that order.
I get groups that do not apply to my post
This function returns every group on the site. Filter by location rules yourself, or read values, which already respect them.










