Sometimes it’s really useful to be able to output HTML in the Customizer that’s not a label or description for a specific control. You may want to output a line break, an image, a button, or simply some additional text.
There isn’t a native Customizer control in WordPress to do this, but you can add your own custom control to output arbitrary HTML. This was a request for the Customizer Library, and the GitHub issue explains the thought process behind the code.
Creating a custom control to output arbitrary HTML is just a few lines of code (label and description could even be removed if you don’t need them):
It’s kind of odd to register the setting since it isn’t actually needed, but WordPress requires a setting in order to output the control.
Output in the Customizer
Once your custom control is loaded, you can output HTML via the Customizer like this:
More on Custom Controls
Corey McKrill also wrote about custom content controls and explains the code in more detail.