List Menu Items
wp_list_menu_itemsList navigation menu items in order, preserving nesting via parent IDs. Provide the menu ID to retrieve item titles, URLs, types, and relationships.
Instructions
List the items in a navigation menu, in order, including nesting (parent IDs). Use the menu_id from wp_list_menus.
Args:
menu_id (number): The menu ID.
response_format (enum): markdown | json. Default 'markdown'.
Returns: { count, items: [{ id, title, type, object, object_id, url, parent, menu_order }] }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| menu_id | Yes | The menu ID whose items to list (from wp_list_menus). | |
| response_format | No | Output format: 'markdown' for human-readable, 'json' for machine-readable. | markdown |