1

On my client's site, there will be quite a few widgetised areas - one for each page created plus global ones. The problem is that they all display in the "widgets" section in theme customizer at the same time, making managing them very problematic.

For example, let's say that the client is in the customizer and is viewing the homepage. On this page, there are 2 dynamic sidebars (specific for this page) and 1 global sidebar (in the footer). At the moment the customizer displays all the 30+ widgetised areas in the site. How to make it show only these 3 widgetised areas that are on the viewed page?

1

You are doing something wrong in your theme, maybe "hiding" the sidebars with css instead of not displaying them at all. The customizer is supposed to display only the sidebars which are actually active on the page.

0

Maybe you can create a new panel for widgets and regroup them like "homepage widgets", "blog page widgets". So you just need to use a short jQuery for that like:

wp.customize.section( 'sidebar-widgets-yourSidebarID' ).panel( 'YourPanelName' );
wp.customize.section( 'sidebar-widgets-yourSidebarID' ).priority( '5' );

Hope this help.

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.