Content Fields exposes a set of template functions for reading and writing field values from PHP. This page is the index; each function has its own page with examples.
What It Does
All of these work on posts, users, terms, comments and options. The second argument is the object — omit it for the current post, or pass an ID, user_12, term_5, comment_3 or option.
Before You Start
- Nexter Extension is installed and active, so the template functions exist.
- You know the field’s Field Name — not its label.
- You are editing a theme template, a template part, or a plugin.
Pick the Right Function
- Reading one value →
nxt_field_value(), ornxt_print_field()to echo it escaped.

- Reading every value on an object →
nxt_field_values().
- Reading the raw stored value, ignoring formatting and conditional logic →
nxt_field_value_raw().
- Asking whether a field exists or has a value →
nxt_field_exists(),nxt_has_field(),nxt_is_field_empty().
- Writing →
nxt_save_field_value(),nxt_erase_field_value(),nxt_reset_field().
- Looping a repeater → the
nxt_repeater_*family. Requires Nexter Extension Pro. In Nexter Extension 4.9.0 without Pro these are no-op stubs: they return empty and loop zero times, with no error.
- Reading group definitions →
nxt_group_definitions().
Display the Value
The shapes you will use most:
<?php
// current post
$v = nxt_field_value( 'price' );
// another post
$v = nxt_field_value( 'price', 123 );
// a user, a term, a comment, the options page
$v = nxt_field_value( 'short_bio', 'user_' . $user_id );
$v = nxt_field_value( 'colour', 'term_' . $term_id );
$v = nxt_field_value( 'note', 'comment_' . $comment_id );
$v = nxt_field_value( 'api_key', 'option' );
Limitations
- These functions exist only while Nexter Extension is active. Guard with
function_exists()if your theme must survive the plugin being disabled. - Values are cached per request, so reading the same field twice does not hit the database twice.
nxt_field_value()respects conditional logic and returnsnullwhen a field’s condition is unmet, even if a value is stored.
Troubleshooting
Fatal error: call to undefined function
Nexter Extension is not active, or your code runs before plugins load. Wrap the call in function_exists( 'nxt_field_value' ).
The function returns null but a value is saved
Conditional logic on that field is not met. Use nxt_field_value_raw() to read the stored value regardless.










