Home › Forums › Backend Issues (wp-admin) › Collapsed Field Groups as Default › Reply To: Collapsed Field Groups as Default
Find the includes/admin/views/field-group-options.php file
Open it
Find in code
acf_render_field_wrap(array(
'label' => __('Style','acf'),
'instructions' => '',
'type' => 'select',
'name' => 'style',
'prefix' => 'acf_field_group',
'value' => $field_group['style'],
'choices' => array(
'default' => __("Standard (WP metabox)",'acf'),
'seamless' => __("Seamless (no metabox)",'acf'),
)
));
after line
‘seamless’ => __(“Seamless (no metabox)”,’acf’)
add new line
‘default closed’ => __(“Standard Collapsed”,’acf’)
Result
acf_render_field_wrap(array(
'label' => __('Style','acf'),
'instructions' => '',
'type' => 'select',
'name' => 'style',
'prefix' => 'acf_field_group',
'value' => $field_group['style'],
'choices' => array(
'default' => __("Standard (WP metabox)",'acf'),
'seamless' => __("Seamless (no metabox)",'acf'),
'default closed' => __("Standard Collapsed",'acf'),
)
));
Save.
Go to settings for any group field
Open “Style” list box
Select “Standard Collapsed”
Update
Have a fun
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.