Display an ACF Field Groups selector as radio, checkbox or select field type.
Setting name | Description |
Allow Field Groups | Filter which field groups can be chosen |
Appearance | Select the appearance of this field |
Default Value | Enter each default value on a new line |
Return Value | Return the field group key, field group object or field group id |
Allow Null | Allow empty value |
Layout | Choose the layout |
Toggle | Allow to toggle all values |
Allow Custom | Allow custom value |
Save Custom | Save custom value in the field settings |
Select multiple values | Allow multiple values selection |
Stylised UI | Enable Select2 UI style |
$field_groups = get_field('field_groups');
// group_63b84a1c13631
$field_groups = get_field('field_groups');
/**
* array(
* 'ID' => 270,
* 'key' => 'group_63b84a1c13631',
* 'title' => 'My Field Group',
* 'fields' => array(),
* 'location' => array(
* array(
* array(
* 'param' => 'post_type',
* 'operator' => '==',
* 'value' => 'page',
* ),
* ),
* ),
* 'menu_order' => 0,
* 'position' => 'normal',
* 'style' => 'default',
* 'label_placement' => 'left',
* 'instruction_placement' => 'tooltip',
* 'hide_on_screen' => array(
* 'the_content',
* 'preview',
* ),
* 'active' => true,
* 'description' => 'Description',
* 'show_in_rest' => 0,
* 'modified' => 1673484326,
* )
*/
$field_groups = get_field('field_groups');
// 270
$field_groups = get_field('field_groups', false, false);
// group_63b84a1c13631