To add that last list item, you don’t need a custom Walker. There is a hook that will allow you to tack that on.
function add_last_nav_item($items) {
return $items .= '<li><a href="#myModal" role="button" data-toggle="modal">Contact</a></li>';
}
add_filter('wp_nav_menu_items','add_last_nav_item');
It wouldn’t be start_el and end_el that you’d need to edit anyway. Those generate the individual list items. It isn’t the place to add another item. I think you would probably need to go up to Walker_Nav_Menu‘s parent Walker class to get to a place where you can add new items but it isn’t worth the effort just to add items.
Related Posts:
- Multi Level Bootstrap Navigation Menu in WordPress
- How do I add the data-toggle=”modal” data-target=”#myModal” attribures to a WP Nav bar?
- Bootstrap drop down menu with wp_nav_menu
- wordpress nav menu using twitter bootstrap
- HTML Bootstrap navigation menu to WordPress menu using wp_nav_menu
- Output the aria-labelledby parameter for a nav menu child
- Add Bootstrap dropdown class to a nav menu
- Nav walker, bootstrap: Display 3rd level items under 2nd level
- Make compatible custom menu widget for Twitter Bootstrap
- Loop through Navbar, Output Icons
- How can I remove data-target=”#” from bootstrap dropdown menu?
- Make menu bootstrap compatible
- Main Menu and Sub Menu Items for Footer
- How to add class to and childs of sidebar widget – WordPress
- How to have two menus using Bootstrap nav walker?
- Side Menu Icon Expandable
- WordPress Walker – Group two items?
- Sticky Header in WordPress using BootstrapWP theme [closed]
- WordPress + Bootstrap [closed]
- wp_nav_menu not displaying the right way
- Bootstrap button menu on wordpress
- wp_get_archives doesn’t take effect from css or html
- Make two bootstrap menus collapse into one dropdown
- WP nav menu + Bootstrap, add role=”menu” to UL
- Responsive menu on genesis theme [closed]
- Bootstrap menu – make menu entries with submenu not clickable
- Bootstrap Menu bar shows up a toggle in Desktop Mode
- WordPress + Bootstrap: Replace primary navigation menu on mobile?
- Stuck while adding bootstrap navwalker class
- How to use Bootstrap Navbar in wordpress Nav Menu
- Navbar is hidden behind carousel when using wp-boostrap-navwalker
- How to create a mobile menu full screen overlay using Understraps Bootstrap 4 theme
- Bootstrap Nav Walker Sub Menu Image
- Change menu for mobile
- How to change navwalker’s dropdown mark-up?
- Bootstrap navbar responsiveness on WordPress theme menu not working
- My WordPress menu based on Twitter bootstrap creates menu-item and not page-item
- Broken drop down menu using Bootstrap and navwalker class
- nav tag wrapping around dropdown
- Convert a custom bootsrap based menu to wordpress nav walker
- WordPress nav Walker – Bootstrap 5.2.3 – submenu not opening
- Nav walker bootstrap: Display 3rd level and 4th level in dropdown menu
- Remove a menu item in menu
- Menu items (all menus) being deleted randomly on their own [duplicate]
- Put a wp_nav_menu inside another one
- WordPress wp_nav_menu within iFrame
- Generate a Menu that displays all child pages of top level parent
- Check if wp_nav_menu items have submenus
- wp_nav_menu doesn’t generate parent/ancestor classes
- WP_nav_menu fallback not working
- How to conditionally register nav menus with advanced custom fields?
- Change where navigation bar links?
- Social Links Menu displays icon instead of text (twentyfifteen) [closed]
- Does wp_nav_menu use the gettext filter?
- How to add #navbar to all page links?
- Multiple WordPress Menus that will only display all pages
- Change an li class name in a wordpress custom menu walker
- Custom walker nav – Add sequential number as class
- WordPress Custom Menus Issue
- wordpress responsive menu not dropping down
- Need Random Category Nav Menu
- How can I add text to a single nav menu item?
- Alternative to wp_get_nav_menu_items?
- Walker menu not displaying at all
- Twenty seventeen Menu is not responsive not clickble
- Second menu has the first menu ID
- How to set classname for tag in wordpress menu?
- Limit wp_nav_menu_objects() only to first-level menu items
- Hide an item from a menu to some users
- Locking in navigation labels before changing title?
- wp_nav_menu_items for one menu
- I can’t add more pages to menu – menu delete pages
- Confused about the correct functioning on WordPress Menus
- Admin Menu Hack (Left side in Dashboard)
- How to manipulate attributes of url-less dropdown item in a the custom wordpress menu?
- How do I remove this menu bar?
- Hide custom menu when when no menu selected
- nav-menu-template and columns in sub menu
- Auto delete menu items with zero products (woocommerce)
- Why is my navigation in my onepage not working?
- Admin menu in different languages
- Edited one page in my working menu and now all menu buttons don’t open unless I right-click and open in new tab
- Need help with Walker_Nav_Menu class
- Impossible to remove page from menu
- What are some of your favorite methods for creating an accessible menu?
- Add active class to wp_nav_menu
- How to get all the menu listed in Menus Created inside the Apperance Menu?
- how to configure this type of menu
- Migrate WP Menu between sites
- Add parent link to its submenu
- Can’t change link for navigation item
- Show Child of Parent Page including all other parents
- Show only second level menu items? [duplicate]
- Add item ONLY to the primairy navigation
- wp_nav_menu in 3.7 add name class nav navbar-nav
- individual images as navigation design TwentyTen
- Is there a limit to number of pages displayed for selection in custom menu?
- Database structure Menu Item
- How do I highlight a WordPress Menu Item for a page that is not on the Menu?
- Link from outside website or another page to a text widget title