Display a Post Status selector as radio, checkbox or select field type.
Setting name | Description |
Allow post statuses | Filter which post status can be chosen |
Appearance | Select the appearance of this field |
Return Value | Return the post status name or object |
Allow Null | Allow empty value |
Layout | Choose the layout |
Toggle | Allow to toggle all values |
Allow Custom | Allow custom value |
Select multiple values | Allow multiple values selection |
Stylised UI | Enable Select2 UI style |
Value can then be retrieved using the common get_field()
function. Usage example:
$post_status = get_field('post_status');
// publish