Custom Field: number
When adding custom fields you can use the number type to display a field.
number Field Type
This will display a field that only accepts numbers.
'name' => 'property_field_number', // Required: Custom field key. 'label' => 'Number Field Label', // Required: Field Label. 'type' => 'number', // Required: Field Type. 'maxlength' => '4', // Optional: Allowed character count. 'include' => array( 'property', 'rental' ), // Optional: Post types or exclude for all. 'class' => 'some-class-name', // Optional. Custom class name. 'help' => 'Optional: Help text.', // Optional: Help text. 'import' => 'preserve', // Optional: Do not update when imported.
Custom number field example:
Field selected: