wp_get_nav_menu_items

It returns the items added to a menu created from admin panel ( Appearance → Menus)

<?php $items = wp_get_nav_menu_items( $menu, $args ); ?>

Here $menu can menu name,id or slug

$args can be

<?php $args = array(
‘orderby’                => ‘menu_order’,
‘post_status’            => ‘publish’ );
?>

Share