wp_get_nav_menu_items ( $menu, $args = array() )

  • (int|string|WP_Term) $menu Menu ID, slug, name, or object.
  • (array) $args { Optional. Arguments to pass to get_posts().
  • (false|array) $items Array of menu items, otherwise false.
Defined at:


Retrieves all menu items of a navigation menu.

Note: Most arguments passed to the $args parameter – save for 'output_key' – are specifically for retrieving nav_menu_item posts from get_posts() and may only indirectly affect the ultimate ordering and content of the resulting nav menu items that get returned from this function.

Related Functions

wp_setup_nav_menu_item, wp_save_nav_menu_items, wp_get_nav_menus, _sort_nav_menu_items, wp_get_nav_menu_name

Top Google Results

User discussions

wpseek mobile