You can access those classes like this:
// where 'Top' is the menu name, slug or ID. But not menu location.
$menu_items = wp_get_nav_menu_items( 'Top' );
foreach ( $menu_items as $menu_item ) {
$menu_classes = $menu_item->classes;
print_r( $menu_classes );
}
Related Posts:
- Parent link need to go first child submenu
- Using a menu walker add a custom item at the end of the menu’s items
- How to count nav menu items?
- How Does The Walker Class Work?
- Does Extending Multiple Nav_Menu_Walkers Allow Nested Menus?
- Display only page specific sub menu items using Custom Walker
- Call custom field into menu item
- Add class to top level menu item if it has multiple child levels
- Simple Navigation Walker – Wrapper-class around first sub-menu
- Add Page ID class to nav menu items
- Pass a parameter to a menu walker
- start_lvl on Walker is not working
- Nav walker, bootstrap: Display 3rd level items under 2nd level
- wp_nav_menu – page template name as item class
- `start_el` depth argument in custom nav walker always evaluates to zero
- Benefits of using Nav Walker?
- Use walker for specific menu, or avoid use of walker
- has_children in custom nav_walker
- Adding post excerpt into navigation menu
- Editing WordPress Nav Menu Walker
- How can I add divs or change li in the submenu of the menu_nav
- Get number of root elements in walker class
- How to add wechat (weixin) link to navigation menu?
- Link that refers to a menu item with dynamically generated URL
- Remove current class from sub menu items
- View h2 content tags of a page in sub menu
- Change an li class name in a wordpress custom menu walker
- Use menu class in walker function
- Getting menu items like get_pages
- Separator for custom nav menu
- Walker class conditional based on parent menu item label or custom css class
- WP Menu Walker – How to know total depth from inside the start_lvl() method
- How to create this Custom Walker Menu
- Put class on instead li
- Menu custom link not working for external site
- Create a MegaMenu using a walker and the start_lvl function
- custom walker class
- wp_nav_menu add class to child item with sub child
- Change submenu markup
- Why is wordpress forcing https link generation?
- How to use a start_el variable in start_lvl
- Page content loading issue using Walker_Nav_Menu
- Split into two seperate unordered lists with custom walker
- creating a custom walker class
- Walker Class – Check if menu item has description and if so add class to li
- Links do not open from click, only in new tab [closed]
- Adding existing links to custom navigation menus?
- How to remove dropdown from wp_nav_menu
- Wrapping link and .sub-menu with wp_nav_menu
- Show children (sub-navigation) of active menu item only
- wp_nav_menu check both hierarchy fail?
- Adding a unique ID to each sub-menu
- How to change the link on the logo at the menu?
- Creating Menu Links in a Custom Theme
- How can I make wp_nav_menu() support tags?
- Walker Class: Output Parent Description and Featured Image right after sub-menu?
- Modifying the walker to insert parent’s description above sub menus
- How to add scroll IDs to WordPress menu anchors
- wp_list_pages Hierarchical Help
- Active class to current link
- custom walker class for own menu?
- Adding a tag to wp_nav_menu
- 2 item in a same menu pointing to 1 page
- How to show pages in menu without link
- Problem with links once in portfolio item
- Add attributes to wrapper html generated by wp_nav_menu
- url_to_postid method in walker_nav navigation menu causing exceptionally high TTFB
- How to create a link-less parent (top level) menu item that doesn’t use an anchor tag
- Is it possible to get_the_post_thumbnail (Featured Image) inside a sprintf function?
- WordPress menu walker – help to add custom class for each submenu
- Structuring Nav Menu and Background Custom page (Help)
- Stuck while adding bootstrap navwalker class
- What is inside in $item in start_el function in Walker_Nav_Menu class
- Adding additional html to the end of the root level in a custom nav walker
- wordpress custom menu – show parents, siblings, children depending on depth
- WordPress customizing a walker menu class
- how do you create this customize menu using wp_nav_menu function?
- Displaying a part of a menu containing the page the user is currently viewing and only it’s immediate children
- Walker or wp_get_nav_menu_items VS jQuery
- WPML CMS Nav and Custom Nav_Walker Undefined Property Notices [closed]
- Add a data attribute to list item element in menu
- Links in new menu don’t work
- Conditional Nav Menu Inside Nav Menu Across Multisite Sites
- How to add odd and even classes to all nav links through walker?
- Output sort number in wp menu list item?
- Cannot add home page url to menu with #
- Check in walker if current page is descendant
- Specific Page that convert Hyperlink to anchor in nav menu
- Add dynamic content block to nav section generated by custom walker
- Customize Walker_nav_menu to show posts if item is category
- Top menu link anchor href value change after online server?
- How can I modify wp_nav_menu with walker?
- Walker for menus
- Use wp_nav_menu to dynamically generate child menus
- Change menu item order
- Menu System: Custom Links
- Broken drop down menu using Bootstrap and navwalker class
- How to centre menu items on horizontal nav bar? (e.g. make margins equal) [closed]
- how can i get the page_ID in nav li [closed]
- Main Menu Hover is Always White