The customizer needs the sidebar to be “displayed” in order to detect its existence on the page. In your code you display the sidebar only if it is “active” which means that it has at least one widget in it, otherwise when no widgets are included it is not displayed and therefore the customizer can not detect it.
Don’t check for sidebar “activity”, the display_sidebar
should output empty div
or a like if no widgets exist in it so no real point in preventing its execution.
Related Posts:
- Get the sidebar ID in which the current widget was dropped
- How to exclude certain widget from showing up on home/front page? [duplicate]
- register_sidebar ‘after_widget’ on custom-built widgets not implementing, caused nested widgets
- Count widgets of a certain type
- Choose sidebars column in widgets.php page [closed]
- How to append custom text to the output of ‘categories widget’?
- How to narrow the area between buttons on Helium theme sidebar? [closed]
- How do I include the sidebar (with Widgets) in a custom theme?
- New WP_Customize API – how does it work under the hood?
- Update widget form after drag-and-drop (WP save bug)
- Limit widget to certain sidebar?
- Disable Visible Edit Shortcuts in the Customizer
- Highlight custom widgets in the admin area?
- How to Add Customizer Setting in Child Theme
- is_home() and is_single() Not Working as Expected with Custom Post Types?
- Widgets not displaying in theme customizer
- customize_register with Multiple controls/settings – how to get values?
- Widgets vs. Theme Mods
- Manipulating post meta in the customizer
- In the new Theme Customizer API, how to send a value from the front back to the admin panel?
- How to get input_attrs in the sanitize function?
- How to change in customizer the “site identity” tab required capabilities
- Customise search form in the Widget
- How to translate month names in “Archives”
- Schedule cron event from widget
- Add new Control to Customizer to modify Headings (h1, h2, h3…) Color
- Add ‘Right Now’ widget to custom dashboard
- I need some direction on how to have a sidebar based on meta rather than page
- Widget Javascript code (ajax)
- How to extend nav-menu-item-control data in Appearance > Customize?
- Updating Widget options in custom install.php
- Change HTML structure for custom menu in sidebar
- What will happen to the additional CSS when the theme is updated?
- Convert an theme options page to use in customize.php also?
- Modify a theme to insert custom widgets?
- Customizer: widget-synced triggers twice
- Add more then one site logo – custom-logo theme support
- Hide devices selection from customizer?
- Can’t see widget areas in my customizer
- Fatal error in wp-admin/customize.php after fresh install due to null $wp_customize
- Can not sanitize select control in customize api
- Function to remove archive sidebar for custom taxonomy?
- Warning: Creating default object… when altering Customize panels
- Adding custom field in all widgets, but at the top of the form, in admin area
- How do I change the markup only of a built-in widget?
- Is it possible to make widget return only data (eg, array)?
- Best practices regarding the creation of custom widgets?
- Bind JS event to WordPress control customizer
- Allow a Widget to be used one time only?
- Search widget will search everything in the site, how to limit to only search gallery name
- “Add A Widget” button in the Customizer
- Organizing the position of widgetized areas in the backend
- Save & Publish disabled for two dimensional array Customizer
- how to convert Html block to dynamic widget?
- I’d like to move the Widgets Panel to the bottom of the list in Customizer
- How do I remove a customiser option from a parent theme in a child theme?
- Create small dashboard widget
- How to add css option to Header Image customizer?
- Widgets won’t save
- Customizing the Widget content markup
- Widget title markup in register_sidebar
- Sticky menu for WP custom menubars
- Add a specific css to a widget
- Stop Expansion of Top Level Menu in the WordPress Admin Sidebar
- Trigger Customizer Publish (save) Action
- How to edit alternate inactive themes in “Appearance -> Customise” screen?
- Is it necessary to prefix theme_mod, section id and panel id in the customizer?
- Hide Customizer’s Widget Choices From The List
- theme customizer – can a single option pass multiple values?
- How to remove Customizer’s Section and move Control straight to Panel using Child Theme
- Remove Customizer Control Choices (Type: Radio Array) using Child Themes
- Dynamic Control in customiser
- Customise the Category Widget
- New checkbox in custom widget isn’t saving data
- What’s the right way to share data between widgets?
- Is it possible to rename a customizer control heading?
- Remove Sidebars from page
- Is it possible to add custom badges to product attributes conditionally, based on custom field?
- Add custom border across footer widget area
- Will WordPress updates remove Gutenberg Additional Classes?
- Customizer options limited to specific user roles?
- Can’t Customize WordPress Page
- Widget recent comment filter by post meta_value
- WordPress Customizer: Check for value of CSS selector and replace it
- How to hide or remove a custom widget area when empty
- Execute function with jQuery if widget added or removed?
- Custom Admin Section
- How to define active widget with js in a customizer
- In wordpress customizer api adding div wrap to control
- Add Social Media icon widget to customizer
- Best strategy for providing theme options using customizer
- Confused about customising widgets
- Special characters showing in fallback font
- customize footer widgets area
- retrieve theme custom settings
- Custom tabs widget don’t work in google chrome, is blocked, do not change the tabs. Why?
- Multiple Customizers
- Which IDE best for WordPress Development? [closed]
- Refresh Customize Section (not preview)
- Where did I put this one line of css?