Is it possible to add controls to sub panels of the widgets panel in the customizer? If yes, how do I address them? The widget area would be named “top-widget-area”
Neither addressing:
'panel' => 'widgets-top-widget-area'
nor
'section' => 'widgets-top-widget-area'
in $wp_customize->add_control
work.
Do you have an idea?
Is it possible to add controls to sub panels of the widgets panel in the customizer? If yes, how do I address them? The widget area would be named “top-widget-area”
Neither addressing:
'panel' => 'widgets-top-widget-area'
nor
'section' => 'widgets-top-widget-area'
in $wp_customize->add_control
work.
Do you have an idea?
Turns out the section would be addressed with 'section' => 'sidebar-widgets-top-widget-area' ... so you need the sidebar-widgets- in front of the widget area name.
However, since it is the widgets panel, everything except the widget areas active on the page your are at are set to display: none; and need to be set to: display: block !important;
@richwp , I asked a similar question and got a detailed answer from Weston Ruter, who actually works on the Widgets customizer panel in core. He created a writeup, a video, and a github repo with source code in order to answer my question (which was an awesome thing to do). Here is the link to the writeup he did: [link]https://make.xwp.co/2017/02/08/adding-meta-fields-to-a-widget-sidebar-section-in-the-customizer/