Customizer JS API: Adding a “dropdown-pages” control

You’re right, that doesn’t work… yet. We didn’t add support for the dropdown-pages control in #30738 because we wanted to leverage the REST API for this control to fetch the pages. So in 4.9 this is the only base control that requires server-side rendering in core. However, in 4.9 it is easy to provide our own implementation of a content template for the dropdown-pages control.

I’ve written a standalone example plugin which includes control template for the dropdown-pages control type. With that template included, you can create controls in the same way you are doing here. Follow #42272 for upcoming core implementation.

Alternatively, you may want to consider the Customize Object Selector plugin, as it provides a control which uses Select2 to provide a searchable interface for selecting one or more pages. See example usage in the Customize Posts plugin.

tech