Skip to main content

SelectOrder

Multi select dropdown with drag-and-drop reordering.

Value

Returns (string|number)[]

$value = json_decode(fx_get_meta('id'), true);

Example

'id' => [
'type' => 'select-order',
'className' => 'my-class-name',
'creatable' => false,
'excludePostType' => false,
'nOptions' => 4,
'options' => 'page, post',
'placeholder' => 'Please select...',
],

Props

className

Metabox class name

type: string

creatable

Allow new options to be created

type: bool

defaultValue: false

exclude

A list of ids to exlude from the options list

type: array

excludePostType

Hide the post type if the option is a post

type: bool

defaultValue: false

options (required)

Options to choose from. See options for more information.

type: array

placeholder

Placeholder text for the input

type: string

defaultValue: 'Please select...'

title

Metabox title

type: string