Set a Customizer setting
set_theme_modSet a WordPress theme customization (theme mod) by key and value. Check existing mods with get_theme_mods first to ensure valid input.
Instructions
Write one Customizer setting (theme mod) for the active theme. What is valid depends entirely on the theme — read get_theme_mods first to see the keys it uses.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Theme mod name, e.g. "custom_logo" or a theme-specific key. | |
| value | No | New value. Types matter: a logo expects an attachment ID, a color expects a hex string. | |
| site_id | No | Which configured WordPress site to act on. Optional — with a single site configured it is used automatically; with several, the default site is used unless you name one. Run list_sites for valid ids. |