Layout Images

The above will bring in layout images to show the user what each radio button does, here are the 3 layout images you can use for your control.

Category dropdown

Use this to display a dropdown of categories. This uses the get_categories() function to get a list of all categories. You could also use the wp_dropdown_categories() function but this way you can easily add additional HTML attributes to your dropdown.

GitHub Repository

I have created a Github repository for this code, included in this repository is a theme-customizer-demo.php file.

This file will instantiate all the of the above controls and will add them to your customizer screen. This will allow you to demo the functionality of each of these controls, to use this file all you have to do is download the repository, and include the files in your WordPress theme. Then open your functions.php file and add a require_once for the demo page.

Navigation to the customizer screen Appearance -> Customize and you will see two new content sections, Default demo controls and Custom Controls Demo. The default demo controls will have all the controls that come within the WordPress core and you can use straight away, have a look at the theme-customizer-demo code for more information on how they are used.

The Custom Controls Demo section will have all the above controls so you can see how they all function.