Delete a widget
delete_widgetRemove a WordPress widget by ID. Moves it to inactive widgets by default to preserve settings, or permanently delete it with force.
Instructions
Remove a widget. By default it is moved to the inactive widgets area so its settings survive; force: true deletes it outright.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Widget id. | |
| force | No | Delete permanently instead of moving to inactive widgets. | |
| 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. |