Custom Field: select
When adding custom fields you can use the select type to display a field.
select Field Type
This will display a select field with dropdown selectable options.
'name' => 'property_field_select', // Required: Custom field key. 'label' => 'Select Field Label', // Required: Field Label. 'type' => 'select', // Required: Field Type. 'opts' => array( // Required: Array of options. 'option-1' => 'Option 1', 'option-2' => 'Option 2', 'option-3' => 'Option 3', ), '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. 'width' => '1', // Optional. Field Width: 1, 2, 2-3, 3. 'import' => 'preserve', // Optional: Do not update when imported.
Custom select field example:
Field selected example: