A repeater holds rows, so reading it is a loop rather than a single value. The nxt_repeater_* family walks the rows and reads the sub-fields in each one.
Requires Nexter Extension Pro. The nxt_repeater_* functions do their real work only when Nexter Pro Extensions 4.8.0 or later is active. On Nexter Extension alone they still exist, so the code below stays valid PHP — but nxt_repeater_has_next() always returns false and nxt_repeater_rows() returns an empty array. The loop simply never runs, with no error and no notice. If your template renders nothing where rows should be, check that Pro is active before debugging the loop.
What It Does
nxt_repeater_has_next() tests whether another row is waiting, nxt_repeater_advance() moves to it, and nxt_repeater_value() reads a sub-field in the current row.
Before You Start
- A repeater field with at least one sub-field.
- A post with rows saved.
- You know the repeater’s field name and its sub-field names.
- Nexter Pro Extensions 4.8.0 or later — repeater fields and the
nxt_repeater_*functions are Pro.
Write the Loop
- Open a
whileonnxt_repeater_has_next(), passing the repeater’s name.
- Call
nxt_repeater_advance()as the first line inside the loop. Forgetting this makes an infinite loop.
- Read each sub-field with
nxt_repeater_value().
- Escape every value as you print it.
Display the Value
The complete pattern:
<?php
while ( nxt_repeater_has_next( 'floorplans' ) ) {
nxt_repeater_advance( 'floorplans' );
$floor = nxt_repeater_value( 'floor_name' );
$area = nxt_repeater_value( 'floor_area' );
printf(
'<li>%s — %s sq ft</li>',
esc_html( $floor ),
esc_html( $area )
);
}
// row number, 1-based
// nxt_repeater_index();
// the whole current row as an array
// nxt_repeater_row();
Limitations
nxt_repeater_advance()must be the first call inside the loop. Without it the cursor never moves and the loop never ends.- Rows are stored as one serialized value, so individual rows cannot be matched with
meta_query. - Nested repeaters work, but the inner loop operates on the innermost cursor — finish the inner loop before continuing the outer one.
Troubleshooting
The page hangs or times out
The loop is missing nxt_repeater_advance(). It must run once per iteration.
Sub-field values come back empty
Use the sub-field name as shown in the builder, not its label, and make sure you are reading after advance(), not before.










