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?
- Hover Hide-Visible Additional CSS not working in WordPress website, but shows properly in Customize window
- New WP_Customize API – how does it work under the hood?
- Update widget form after drag-and-drop (WP save bug)
- How do register_sidebar() and get_sidebar() work together?
- 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 Can A Widget With Only One Instance Be Defined?
- get_theme_mod(); returns nothing
- 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
- Customizer image control default value showing in customizer but not on frontend
- How to translate month names in “Archives”
- Customizer: How do you add HTML to control labels?
- Schedule cron event from widget
- Add new Control to Customizer to modify Headings (h1, h2, h3…) Color
- How to Register and Display Widget for Custom taxonomy
- 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)
- Custom widget select options needs to stay selected after save
- How to extend nav-menu-item-control data in Appearance > Customize?
- Custom Widget form function common elements
- 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
- How did I enable atom feeds in a fresh WP3 install?
- 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
- How to update preview when custom setting changed in my custom widget
- Enabling Additional CSS / custom-css
- Child Theme – how to add new widget on a specific place?
- 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
- Disable widgets in customizer for sidebar
- For a specific theme, how do I build a list of all the possible theme modification names?
- Unable to edit the “customize” section and the “widget” section is populating unknown code
- Can’t receive $args[ ] to my custom widget
- 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?
- Allow guests to use WP Customizer but disable save button
- 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?
- Best practice for including plugin output in a template without using shortcode?
- 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?
- Dynamic Sidebars based on page name
- Remove Sidebars from page
- Customize Widget Navigation
- Is it possible to add custom badges to product attributes conditionally, based on custom field?
- Add custom border across footer widget area