wordpress_update_menu_item
Update a WordPress menu item (title, url, parent, position, classes, etc.).
wordpress_update_menu_item
Update a menu item.
Parameters
9 parameters, 1 required.
| Name | Type | Required | What it is |
|---|---|---|---|
item_id | number | yes | Menu item ID |
title | string | no | Menu item title |
url | string | no | Custom URL (for custom links) |
parent | number | no | Parent menu item ID |
position | number | no | Position in menu |
target | string | no | Link target |
classes | string | no | CSS classes |
attr_title | string | no | Title attribute |
description | string | no | Item description |
Example call
The smallest valid call, with the required parameters only:
{
"name": "wordpress_update_menu_item",
"arguments": {
"item_id": 123
}
}
Response
{
"success": true,
"updated": true,
"item_id": 1001
}
What it changes
It writes to the site. Respira takes a snapshot before the write, and the change can be undone from that snapshot for 90 days. Calling it twice with the same arguments leaves the site in the same state as calling it once. On a connection set to read-only it is refused with respira_scope_denied.
How long it takes
A typical call takes about 2.1 seconds. 19 in 20 finish within 4.1 seconds. Measured on real sites over the last week, so it includes the site's own hosting.
Availability
Works on any WordPress site, whichever page builder it uses. Available since Respira 1.0.0.
Example Prompts
- "Rename menu item 1001 to 'Start Here'"
- "Move menu item 1005 under menu item 1002"
- "Update the URL of menu item 1001 to /home"
Related Tools
Was this page helpful?