Title: Nested Panels?
Last modified: January 26, 2018

---

# Nested Panels?

 *  Resolved [ThemeAWESOME](https://wordpress.org/support/users/tsquez/)
 * (@tsquez)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/nested-panels/)
 * Another quick question: Can nested panels be created with Kirki?
 * Like:
 * `Panel> Sub Panel > Section`
 * or:
 * `Panel > Sub Panel > Sub Panel > Section`
 * Just curious because I know you closed an issue on GH ([https://github.com/aristath/kirki/issues/1739#issuecomment-359179252](https://github.com/aristath/kirki/issues/1739#issuecomment-359179252))
 * and you stated:
 * > Nested work fine
 * So how exactly are nested panels created?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Ari Stathopoulos](https://wordpress.org/support/users/aristath/)
 * (@aristath)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/nested-panels/#post-9906617)
 * When you create a panel you do something like this:
 *     ```
       Kirki::add_panel( 'panel_id', array(
           'priority'    => 10,
           'title'       => esc_attr__( 'My Panel', 'textdomain' ),
           'description' => esc_attr__( 'My panel description', 'textdomain' ),
       ) );
       ```
   
 * If you want it nested inside another panel, you’d simply add `'panel' => 'parent_panel_id'`.
 * Note though that a panel without sections will not appear. So you must have at
   least 1 section in the paren panel as well.
 * Similarly, you can nest a section inside another section simply by adding to 
   the child section `'section' => 'parent_section_id'`.
    But again, a section without
   controls will not work, so you should have at leat 1 control in the parent section.
 * However just a personal note:
    I added those features because they were highly
   requested. But I don’t believe they should be really used… If a theme’s settings
   are so many and so confusing in hierarchy that they require nesting in more than
   2 levels (panel & section) then there’s something wrong with the way the theme
   is designed or structured. In theory the nested panels & sections will allow 
   you to do something like this:
 *     ```
       Panel
       |---Section
       |---|---Settings
       |---Section
       |---|---Settings
       |---|---Sub-Section
       |---|---|---Settings
       |---Sub-Panel
       |---|---Section
       |---|---|---Settings
       |---|---Section
       |---|---|---Settings
       |---|---|---Sub-Section
       |---|---|---|---Settings
       ```
   
 * However that will be extremely confusing & counter-intuitive for users no matter
   how well it’s organized.
 * In short: Yes, you can nest panels and sections with Kirki. But please try not
   to.. 🙂
 *  Thread Starter [ThemeAWESOME](https://wordpress.org/support/users/tsquez/)
 * (@tsquez)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/nested-panels/#post-9908026)
 * Hi there,
 * The reason I asked this question is that I used this: [https://gist.github.com/OriginalEXE/9a6183e09f4cae2f30b006232bb154af](https://gist.github.com/OriginalEXE/9a6183e09f4cae2f30b006232bb154af)
   to create nested panels for my [TotalPress](https://wordpress.org/themes/totalpress/)
   theme.
 * And yes I understand your reasoning about using sub panels and the like, however
   they can be very helpful when done correctly.
 * > However that will be extremely confusing & counter-intuitive for users no matter
   > how well it’s organized.
 * That all depends on the end user amigo, always has, always will. Even the most
   simple of things can be an extremely difficult challenge to some. It just depends.
   As a developer you should know this.
 * Thanks for the info, I greatly appreciate it 😉
 *  [Ari Stathopoulos](https://wordpress.org/support/users/aristath/)
 * (@aristath)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/nested-panels/#post-9908598)
 * Oh I agree 100% that it’s up to the user.. all I’m saying is that my personal
   opinion is that themes should try and follow the [WordPress Core Philosophy](https://wordpress.org/about/philosophy/)
   of “decisions, not options”. I have found it to be one of the most important 
   ones to follow in my own projects. Again this is just a personal preference.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Nested Panels?’ is closed to new replies.

 * ![](https://ps.w.org/kirki/assets/icon-256x256.jpg?rev=3518366)
 * [Kirki – Freeform Page Builder, Website Builder & Customizer](https://wordpress.org/plugins/kirki/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/kirki/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/kirki/)
 * [Active Topics](https://wordpress.org/support/plugin/kirki/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/kirki/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/kirki/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Ari Stathopoulos](https://wordpress.org/support/users/aristath/)
 * Last activity: [8 years, 4 months ago](https://wordpress.org/support/topic/nested-panels/#post-9908598)
 * Status: resolved