wp_remove_menu_item
Removes a specified item from a WordPress navigation menu via the REST API, with dry-run preview and production safety guard.
Instructions
Remove one item from a navigation menu (the page it links to is NOT deleted).
item_id is the menu ITEM id - not a page id. DEFAULTS TO dry_run=true (returns
a preview; deletes nothing). Pass dry_run=false to apply. Requires the REST
transport. Prod writes require allow_prod=true.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"install": "<install>",
"item_id": "<item_id>"
},
"name": "wp_remove_menu_item"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | ||
| install | Yes | ||
| item_id | Yes | ||
| allow_prod | No |