Support » Developing with WordPress » How do I stop the Customizer from automatically hiding panels

  • The Customizer does this really annoying thing where it won’t show a sidebar unless you browse to the actual page where the sidebar appears. e.g. A Sidebar that is only used on a Page will only appear in the Widgets Panel in the Customizer when you actually browse to a Page

    Hiding Customizer Panels/Options like this is a huge UX issue. You’re basically forcing your users to browse to every single page on your site so they can check that they’ve found all the available Customizer options.

    My question is, how do I stop the Customizer from doing this? When I select the Widgets panel I want to see ALL the widgets ALL the time!

Viewing 2 replies - 1 through 2 (of 2 total)
  • This is related to:

    • #39087 (Customizer: Add indicator when additional widget areas are hidden)
    • #33052 (Widgets section in customize late to show up)
    • #27405 (Widget Customizer: Fade out sidebar sections that lack any rendered widgets)

    In short, the reason why the sidebars sections are hidden is because if they are not shown in the preview then you’d be editing the widget blind, without the ability to preview it. Also, given a site that may have dozens (or even hundreds) of sidebars registered, by only showing the sidebars that are relevant to the current page being previewed.

    That being said, you can actually override this behavior easily with the following code in a theme or plugin:

    add_filter( 'customizer_widgets_section_args', function ( $args ) {
    	$args['active_callback'] = '__return_true';
    	return $args;
    } );

    With that in place, the sidebar sections will always be active.

    • This reply was modified 2 years, 10 months ago by Weston Ruter.
    • This reply was modified 2 years, 10 months ago by Weston Ruter.

    Hi Weston,

    Thanks for your quick reply.

    While I can understand why it was done, I don’t believe that its very good for usability or UX.

    When you’re setting up a new theme, you usually have no idea of what Customizer options are available to you until you actually go into the Customizer and look around. I’ve never seen any theme documentation that specifically lists all the Customizer options available to you.

    If the Customizer hides panels from you, how are you supposed to know they’re available? By hiding panels your forcing people to browse to every single page in their site, just so they can make sure that they haven’t missed any options in the Customizer.

    When you’re setting up a site, a lot of the time you know what you want to appear in the sidebar. If there’s multiple sidebars, ones that only appear on Single Posts for example, even if you know that this sidebar exists, you’re making the whole process considerably slower as you’re forcing people to navigate to another page just so they can actually see that Customizer option. If people want to be able to add Widgets to a sidebar without bothering to preview them, why is that an issue? That’s entirely up to them. WordPress is now forcing you to only work a certain way. i.e. You MUST preview this page or I wont show you the option.

    I’ll be interested to see where Ticket #39087 goes as this obviously raises the same issue.

    In Ticket #33052 (which is now closed) you mention you mentioned that:

    Customizer: Always show Widgets panel initially if sidebars are registered; show notice to users in panel if no widget areas are in current preview.

    It also lists a ticket for the fix, but this doesn’t actually look like it’s been implemented. There’s no notification that a Sidebar is available, but nothing in the current view. The sidebar is simply hidden. If it was implemented, it seems like the fix has basically been overridden with the decision to hide the sidebars altogether, which seems like a step backwards.

    Ticket #27405 seems to go hand-in-hand with ticket #39087, but it’s been opened for over 3yrs now. Is anything going to happen with this one?

    I raised a similar issue on the beta forum when I was testing 4.7 and TwentySeventeen. I had a back-n-forth discussion with Mika and although nothing actually happened about it, it was some consolation when Mika said that this functionality was theme specific. I was disappointed when I noticed today that it’s not actually theme specific and that this functionality has actually been implemented in the core Customizer functions.

    With all that said, at least there’s a filter that disables this functionality. So thanks for showing me that. I still question why hiding options is the default though as it makes it extremely confusing for the end user and also more time consuming when updating theme options, by forcing people to browse to different pages in their site.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How do I stop the Customizer from automatically hiding panels’ is closed to new replies.