5

Is it possible to put sections within sections at all? It would be very helpful for me to be able to do so due to having several options per section and I don't want the user to be overloaded with information.

3

There is no core customizer behavior that supports nested sections. However, you can roll your own customizer control which contains its own accordion sections and other controls.

Keep in mind that each control relates to exactly one theme_mod variable, so my suggestion would be to implement a fairly generic control that is collapsible and contain a variety of form elements.

  • Thats a clever idea - I didn't think of that, I'll give it a go and pray it works :P – Silenced Feb 24 '14 at 16:07
3

Old question but new Answer

There is now ways to add nested sections, with Customizer Panels. Panels can group customizer sections together and can also set access permission.

see https://developer.wordpress.org/reference/classes/wp_customize_manager/add_panel/

Example:

$wp_customize->add_panel( 'panel_id', array(
    'priority'       => 10,
    'capability'     => 'edit_theme_options',
    'theme_supports' => '',
    'title'          => '',
    'description'    => '',
) );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.