All,
I’m using the following code to get all of the defined wordpress menus that are created:
$menus = wp_get_nav_menus();
I know the ID of the menu I want to use. Based on the menu ID I’d like to get the Pages that are in that menu and the corresponding Navigation Label based on a selected menu ID. How can I go about doing that?
I actually discovered this:
$menu_items = wp_get_nav_menu_items($options['menu_choice']);
In that example the $options[‘menu_choice’] is the selected Menu ID but what I really would like is to give the permalink value. Can I get that from this?
Thanks for any help in advance!
To access the title and url of each item in a menu using the
wp_get_nav_menu_items()function: