Field Render

Display an ACF Block Types selector as radio, checkbox or select field type.

Field Group

Field Settings

Setting nameDescription
Allow Block TypesFilter which block types can be chosen
AppearanceSelect the appearance of this field
Default ValueEnter each default value on a new line
Return ValueReturn the block type name or block type object
Allow NullAllow empty value
LayoutChoose the layout
ToggleAllow to toggle all values
Allow Custom
Allow custom value
Save Custom
Save custom value in the field settings
Select multiple valuesAllow multiple values selection
Stylised UIEnable Select2 UI style

Field Value

Value can then be retrieved using the common get_field() function. Usage example:

$slug = get_field('block_types');

// my-block-type