A number field stores a number — a price, a count of bedrooms, a weight — so it can be compared, sorted and used in calculations rather than treated as text.
What It Does
The field gives editors a numeric input. Because the value is stored as a number, you can sort and filter posts by it in a way that is unreliable with a text field.
Before You Start
- Nexter Extension is installed and active.
- Content Fields is enabled under Nexter → Content Fields.
- You have a field group, or are about to create one.
Add a Number Field
- Go to Nexter → Content Fields and open the Group Fields tab.
- Open a field group, or create a new one.
- Click Add Field.

- Set Field Label to Price. The Field Name fills in automatically and is what you use in code.
- Set Field Type to Number.

- Click Update.


Field Settings
Every field is configured across four tabs. These are the settings this field type offers, read from the field group builder in Nexter Extension 4.9.0.
General
| Setting | Options | What it does |
|---|---|---|
| Default Value | No help text in the UI. |
Validation
| Setting | Options | What it does |
|---|---|---|
| Required | No help text in the UI. |
Presentation
| Setting | Options | What it does |
|---|---|---|
| Instructions | No help text in the UI. | |
| Minimum Value | No help text in the UI. | |
| Maximum Value | No help text in the UI. | |
| Step Size | No help text in the UI. | |
| Placeholder Text | No help text in the UI. | |
| Prepend | No help text in the UI. | |
| Append | No help text in the UI. | |
| Wrapper Attributes | No help text in the UI. |
Conditional Logic
| Setting | Options | What it does |
|---|---|---|
| Conditional Logic | No help text in the UI. |
When to Use It
- A price or cost.
- A count — bedrooms, servings, seats.
- A measurement such as weight or area.
Display the Value
Format the number for display rather than printing it raw:
<?php
$price = nxt_field_value( 'price' );
if ( '' !== $price ) {
echo esc_html( number_format_i18n( (float) $price ) );
}
Limitations
- Numbers are stored as post meta, which MySQL sorts as text unless you tell it otherwise. When sorting, use
'meta_type' => 'NUMERIC'in your query. - A number field holds one value, not a range. For a range, use two fields.
Troubleshooting
Sorting by this field puts 10 before 9
The query is sorting as text. Add 'meta_type' => 'NUMERIC' to the meta_query or the orderby clause.
Zero is treated as empty
Compare against an empty string rather than using empty(), which treats 0 as empty. The example above uses '' !== $price for exactly that reason.










