Update / Move Widget
wp_update_widgetUpdate a widget's content or move it to another sidebar, including deactivation via the inactive widgets area.
Instructions
Update a widget's content and/or move it to another sidebar (use sidebar 'wp_inactive_widgets' to deactivate). Core REST PUT /wp/v2/widgets/{id}. Requires admin.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Widget instance ID (e.g. 'block-5'). Get from wp_get_widgets. | |
| content | No | New block markup for the widget body. | |
| sidebar | No | Move the widget to this sidebar ID. Use 'wp_inactive_widgets' to deactivate. | |
| response_format | No | Output format: 'markdown' for human-readable, 'json' for machine-readable. | markdown |