Read a menu
wp_get_menuRetrieve a WordPress navigation menu and its ordered items by ID, slug, or name for read-only inspection. List available menus first if the target is unknown.
Instructions
Get one navigation menu with its items, in menu order. Returns menu (id, name) and items, each with item_id, title, url, parent (item_id of the parent item, 0 at top level) and order. Read-only; needs edit_theme_options. An unknown menu is a not-found error; wp_list_menus lists the menus.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| menu | Yes | Menu id, slug or name, as wp_list_menus returns them. |