Edit WordPress Menu
wordpress_edit_menuEdit a WordPress navigation menu: add, rename, relink, reorder or remove navbar and footer links, create a menu, or assign one to a theme location.
action is one of: add_item, update_item, delete_item, reorder, create_menu, assign_location, restore. Link to an existing page with page_id, or to any address with url. Use wordpress_menus first.
Classic menus: pass menu_id, and item_id for an existing link. parent_id makes the link a dropdown child; order is the list of item ids in the sequence you want. Block themes: pass nav_id instead, and identify a link by its path (for example "2.1") rather than item_id; parent is the path of the link it should sit under; order is a list of paths. A previous version is kept, so action="restore" rolls the navigation back.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | ||
| name | No | ||
| path | No | ||
| order | No | ||
| title | No | ||
| action | Yes | ||
| nav_id | No | ||
| parent | No | ||
| target | No | ||
| item_id | No | ||
| menu_id | No | ||
| page_id | No | ||
| location | No | ||
| position | No | ||
| site_url | No | ||
| parent_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||