Last Updated: Version: 1.5.4
Back to Main Index

Filters config elements to allow you to unregister or remove a control from the Customizer.

Please use caution when removing default/core controls in commercial products. The user may refer to Layers documentation which states a control is in a specific place, so if you remove or move it, it can cause confusion.

Location: core/helpers/controls.php


In the following example we filter the default Layers color controls using the layers_customizer_controls hook on our “my_customizer_controls” callback. The callback can be whatever you want as long as it is unique, ie “yourthemename_remove_heading_color”.

Line 3: The first argument, shown here as site-color-heading ,  must be a valid control name. See Layers Customizer Defaults for reference.