Set Theme Mods (Kadence/Customizer)
wp_set_theme_modsUpdate the active WordPress theme's Customizer settings programmatically. Set or remove theme_mods to control layout, colors, and header options via command.
Instructions
Set and/or remove the active theme's theme_mods — drives Kadence/Customizer settings by command. Uses the companion "Ars Nova Bridge" plugin (must be active). Requires admin.
CAUTION: theme_mods control header/layout/colors. ALWAYS read current values with wp_get_theme_mods and back them up before bulk changes. Removing a key resets it to the theme default.
Args:
mods (object): key:value pairs to set. Values may be string/number/bool/array/object.
remove (string[]): keys to reset to default.
response_format (enum): markdown | json.
Returns: what changed/removed plus the full updated theme_mods map.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mods | No | Object of theme_mod key:value pairs to set. Values may be string, number, boolean, array, or object. | |
| remove | No | List of theme_mod keys to remove (reset to the theme's default). | |
| response_format | No | Output format: 'markdown' for human-readable, 'json' for machine-readable. | markdown |