Menu Toolswordpress_assign_menu_location

wordpress_assign_menu_location

Assign a WordPress menu to a theme menu location.

wordpress_assign_menu_location

Assign a menu to a theme location.

Parameters

2 parameters, 2 required.

NameTypeRequiredWhat it is
locationstringyesLocation slug (e.g., "primary", "footer")
menu_idnumberyesMenu ID to assign (use 0 to unassign)

Example call

The smallest valid call, with the required parameters only:

{
  "name": "wordpress_assign_menu_location",
  "arguments": {
    "location": "value",
    "menu_id": 123
  }
}

Response

{
  "success": true,
  "updated": true,
  "location": "primary",
  "menu_id": 10
}

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.

Availability

Works on any WordPress site, whichever page builder it uses. Available since Respira 1.0.0.

Example Prompts

  • "Assign menu 10 to the primary location"
  • "Unassign any menu from the footer location"