Sometimes a template needs the field’s setup, not its value — its label, its type, or the choices it offers. nxt_field_definition() returns that.
What It Does
It returns the field’s configuration together with its current value, so you can render a label or iterate the available choices without hard-coding them.
Before You Start
- Nexter Extension is active.
- You know the field’s Field Name.
- You are editing a template or a plugin.
Read a Definition
- Call
nxt_field_definition()with the field name.

- Read the parts you need — label, type, settings.
- For just the label or type, the shorthand functions are simpler.
- For every field on the object at once, use
nxt_field_definitions().
Display the Value
The definition, and the shorthands:
<?php
$def = nxt_field_definition( 'status' );
// shorthands for the common cases
$label = nxt_field_label( 'status' );
$type = nxt_field_type( 'status' );
$conf = nxt_get_field_settings( 'status' );
// render the label from the field rather than hard-coding it
printf( '<dt>%s</dt><dd>%s</dd>',
esc_html( $label ),
esc_html( nxt_field_value( 'status' ) ) );
Limitations
- The definition describes the field as configured, not as it appears after conditional logic.
- Reading definitions is more work than reading a value. Use it when the label or choices genuinely need to come from the field, not out of habit.
Troubleshooting
It returns nothing
The field is not registered for this object. Check the name and the group’s location rules with nxt_field_exists().
I only need the label
Use nxt_field_label() — it is the same information with less to unpack.










