Skip to content

Menu Tools

Menu tools manage WordPress navigation menus and theme location assignments. Available on all plans.

ToolDescription
wp_list_menusList all menus
wp_setup_menuCreate + populate a menu in one call
wp_delete_menuDelete a menu
wp_list_menu_locationsList available theme locations
wp_assign_menu_locationAssign a menu to a theme location
wp_list_menu_itemsList items in a menu
wp_add_menu_itemAdd an item to a menu
wp_update_menu_itemUpdate a menu item
wp_delete_menu_itemDelete a menu item
wp_reorder_menu_itemsReorder items
// wp_setup_menu
{
"name": "Main Navigation",
"location": "primary",
"items": [
{"title": "Home", "url": "/", "order": 1},
{"title": "About", "url": "/about/", "order": 2},
{"title": "Pricing", "url": "/pricing/", "order": 3},
{"title": "Contact", "url": "/contact/", "order": 4}
]
}
// wp_add_menu_item — by URL
{"menu_id": 5, "title": "Blog", "url": "/blog/", "order": 5}
// wp_add_menu_item — link to a page by ID
{"menu_id": 5, "object_type": "page", "object_id": 42, "order": 5}

Pass parent_id to nest under another item:

{"menu_id": 5, "title": "Team", "url": "/about/team/", "parent_id": 12, "order": 1}
// wp_assign_menu_location
{"menu_id": 5, "location": "primary"}

Check available locations with wp_list_menu_locations first — slugs are theme-specific.