I think you can use this simple class:
Related Posts:
- Display only page specific sub menu items using Custom Walker
- Add class to top level menu item if it has multiple child levels
- Simple Navigation Walker – Wrapper-class around first sub-menu
- Custom Nav Walker sub-menu HTML construct
- Check if wp_nav_menu items have submenus
- Add div to specific sub-menu
- Nav walker, bootstrap: Display 3rd level items under 2nd level
- Sub-Pages only of menu items in current branch using a custom menu
- How to display dynamic content in start_lvl function
- How to add a submenu toggle button inside all “li” elements that have a submenu?
- Main Menu and Sub Menu Items for Footer
- How to construct a custom html for submenus
- How to add ID attribute to each submenu?
- Change submenu markup
- getting the current sub item out of total sub items in a given dropdown (custom walker)
- How to Add support for sub-menu item description in wordpress?
- Menu walker: how to tell if a sub menu contains submenus?
- Where to place a svg chevron down in my custom walker?
- Displaying a part of a menu containing the page the user is currently viewing and only it’s immediate children
- Conditional Nav Menu Inside Nav Menu Across Multisite Sites
- Nav walker bootstrap: Display 3rd level and 4th level in dropdown menu
- Display a portion/ branch of the menu tree using wp_nav_menu()
- Split up wp_nav_menu with custom walker
- Custom Nav walker display current menu item children, or siblings on no children
- Add a custom walker to a menu created in a widget
- Using a menu walker add a custom item at the end of the menu’s items
- Error “Trying to get property of non-object” with Custom Walker for wp_nav_menu
- How to count nav menu items?
- How Does The Walker Class Work?
- Add custom menu item using wp_nav_menu_items filter
- Does Extending Multiple Nav_Menu_Walkers Allow Nested Menus?
- how to create a menu with all sub categories?
- How does a minimal menu walker look like?
- Add separator to admin submenu
- WordPress Menu Custom Walker Class
- How to create this custom menu walker?
- Call custom field into menu item
- add span class inside wp_nav_menu link anchor tag
- Add a .last class to the last in each ul.sub-menu
- Multi Level Bootstrap Navigation Menu in WordPress
- Determine if a navigation item has children
- How show sub menu only using wp_nav_menu()
- Show only 2nd level of navigation depending on active navigation
- How do I pass an argument to my custom walker?
- How to get a separate child menu?
- Custom Nav Walker menu – Display children count
- Exclude one item from wp_list_pages( $args );
- Add Page ID class to nav menu items
- Using string instead of object class instantiation on the walker argument breaks wp_nav_menu
- Pass a parameter to a menu walker
- wp_nav_menu() loses ‘current-menu-*’ classes on single product page within category
- How to drag multiple menu items at once in WordPress?
- Customizing the a tag with Semantic UI
- Adding attributes to link in wp_nav_menu using custom Walker function
- Walker_Nav_Menu: put custom code between a particular
- Show top-level parent with submenu menu walker
- Put a wp_nav_menu inside another one
- Adding a class (arrows) to main menu links that have children?
- Custom nav walker with different output depending on depth
- Adding html elements to wp nav menu
- How to make pages metabox display all hierarchy in menu admin?
- Bar separated navigation by extending Walker_Nav_Menu
- Add items to a menu dynamically
- Generate a Menu that displays all child pages of top level parent
- Bar separated navigation by extending Walker_Page
- Output the aria-labelledby parameter for a nav menu child
- How can I add a sub menu to an existing navigation menu in WordPress?
- start_lvl on Walker is not working
- Customizing a walker menu class
- Automatically Add New Tags to Sub-menu
- How to add ID and class in nav menu walker?
- wp_nav_menu custom walker – child items
- How to remove trailing tags from wp_nav_menu walker
- Adding different classes to anchor in navigation menu
- How to add parent element’s title to nav menu’s child?
- how to only add a top-level admin menu without it creating a sub-level-menu
- how to automatically generate hierarchical menus from hierarchy of pages?
- Custom Walker for Walker_Nav_Menu
- Arrow down in menu not displaying
- Programmatically adding menu items function replicates in multiple menus
- wp_nav_menu – page template name as item class
- Handling complex multi-level architecture / menu for large site
- `start_el` depth argument in custom nav walker always evaluates to zero
- Custom Walker anchor tag not inheriting attributes
- Indirect modification of overloaded property WP_Post::$classes has no effect
- Benefits of using Nav Walker?
- Check what “type” a menu item is
- Custom Nav Walker to show siblings and children of current branch?
- Use walker for specific menu, or avoid use of walker
- Update Nav Menu Items Programmatically
- Create self-populating menu and add extra divs to the menu layout
- Getting post content within wp_nav_walker
- Add custom text to menu
- has_children in custom nav_walker
- wp_list_pages: only show subpages on the parent page?
- Menus like a CMS
- How to add a tag to wp_nav_menu in a child theme
- Adding post excerpt into navigation menu
- How to have custom menu Item CSS Classes for wp_page_menu() or wp_list_pages()
- Counting top level items in a custom menu walker