Hope this code will helpful for you, add the items_wrap in wp_nav_menu to merge li’s
<?php
wp_nav_menu( array( 'theme_location' => 'primary', 'container' => '', 'menu_id' => '', 'menu_class'=> '', 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s<li><a href="http://www.example.com/contact">Contact</a></li><li><a href="javascript:void(0);">Search</a></li></ul>' ) ); ?>
Related Posts:
- Split up wp_nav_menu with custom walker
- Call custom field into menu item
- add span class inside wp_nav_menu link anchor tag
- Determine if a navigation item has children
- Add Page ID class to nav menu items
- Bar separated navigation by extending Walker_Nav_Menu
- Bar separated navigation by extending Walker_Page
- Custom Nav Walker sub-menu HTML construct
- `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
- How to display dynamic content in start_lvl function
- Add custom text to menu
- has_children in custom nav_walker
- Adding post excerpt into navigation menu
- Use wp_nav_menu to display ALL pages
- Third level navigation class
- How to add a submenu toggle button inside all “li” elements that have a submenu?
- add span class and i tag inside wp_nav_menu link anchor tag
- Change an li class name in a wordpress custom menu walker
- Add within the output of
- Is this format possible with a custom Nav Walker class?
- walker – 0 level on submenu formatting
- Determine the last child of the parent menu WP Nav Walker
- Navigation doesn’t render when wp is hosted
- How do you add a around the second level of a Menu?
- Help with walker for nav
- How to remove dropdown from wp_nav_menu
- How Do I Add Images To Main Navigation Menu
- Walker menu not displaying at all
- Show children (sub-navigation) of active menu item only
- Adding a unique ID to each sub-menu
- Remove a class from a using Walker
- How to Add support for sub-menu item description in wordpress?
- wp_list_pages Hierarchical Help
- changing the labels inside appearance -> menus for some for the fields
- Costum walker with sub menu item count
- How do I add 3rd level of dropdowns to wp_nav_menu array?
- Help with WordPress Custom Nav Walker
- Why is my navigation in my onepage not working?
- url_to_postid method in walker_nav navigation menu causing exceptionally high TTFB
- Is it possible to get_the_post_thumbnail (Featured Image) inside a sprintf function?
- Can I now add a class in the anchor of my menu item with WordPress 5.4?
- What is inside in $item in start_el function in Walker_Nav_Menu class
- Multi-Level Nav Bar
- Change markup for just 2nd list element in custom Walker menu
- Where to place a svg chevron down in my custom walker?
- Add active class to wp_nav_menu
- Output existing wp_nav_menu with a custom walker
- how to split vertical menu into two columns using walker nav menu
- 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?
- Creating custom Menu for custom theme
- Check in walker if current page is descendant
- Can’t add optional class to menu item when using Walker_Nav_Menu
- Add dynamic content block to nav section generated by custom walker
- Customize Walker_nav_menu to show posts if item is category
- Determine if a navigation item has children
- Walker for menus
- how to make a walker to this (in bootstrap, i try but not work)
- how can i get the page_ID in nav li [closed]
- Custom navigation / menu output (walker?)
- Programmatically add a Navigation menu and menu items
- How to count nav menu items?
- Exclude Private, Draft pages from Primary Nav when using custom menu
- wp_nav_menu always falls back to a menu
- wp_get_nav_menu_items how to exclude sub level menu items?
- Add class to top level menu item if it has multiple child levels
- Not able to get current menu ID
- Why is ‘nav_menu_item_args’ filter’s $item argument empty?
- WordPress wp_nav_menu with a nav tag
- Programmatically set current-menu-item using wp_nav_menu
- Adding Custom “Current Menu Item” class to navigation?
- How can I add divs or change li in the submenu of the menu_nav
- Get number of root elements in walker class
- Check if menu id = $specific_id – then insert specific
- Remove current class from sub menu items
- How to create this Custom Walker Menu
- current-menu-item class is not added
- wp_page_menu not working right?
- creating a custom walker class
- How to get rid of the home link in nav menu?
- Is it possible to add a dynamic link in the main navigation in a child theme
- wp_nav_menu check both hierarchy fail?
- How to make wordpress nav menu use post custom meta data
- add another html tag after li element in wp_nav_menu
- How to add scroll IDs to WordPress menu anchors
- custom walker class for own menu?
- How to add a menu that belongs to parent blog to all child-blogs?
- Navigation bar is on live site but nothing under menu so can’t add in a page
- Displaying a part of a menu containing the page the user is currently viewing and only it’s immediate children
- Show thumbnail to category items in wp_nav_menu(), how?
- Add the “.current-menu-item” class to tag?
- Replace Menu Item with Logged in username
- Use wp_nav_menu to dynamically generate child menus
- How was this menu system created?
- Broken drop down menu using Bootstrap and navwalker class
- Navigation menu displays permalinks
- Tried to hide navigation menu on one page ended up SCRAMBLING the navigation menu on another