Check out the nav_menu_link_attributes filter. Using this you should be able to grab the href and modify it as you require.
Related Posts:
- Add custom menu item using wp_nav_menu_items filter
- Removing link ” from ” menu for some “links” without JS
- Using filters to change href of nav menu page link
- Links open only on new tab or window
- How to get current page menu item name instead of full menu item list
- Adding different classes to anchor in navigation menu
- Pending Custom Link in Menu
- Force PDF download from custom menu?
- Page-Linking Structure
- How to add wechat (weixin) link to navigation menu?
- Admin only menu/page
- Image as a link using wp_nav_menu()
- Link that refers to a menu item with dynamically generated URL
- Fragment URL in navigation item without a custom link
- Link to Homepage in Menu
- Separator for custom nav menu
- How do you link to a place in another page without any styling issues?
- Custom Links menu items include in Search Results
- Menu custom link not working for external site
- Why is wordpress forcing https link generation?
- Links do not open from click, only in new tab [closed]
- Adding existing links to custom navigation menus?
- How to change the link on the logo at the menu?
- Creating Menu Links in a Custom Theme
- The cart, checkout, and shop links not getting removed
- URL links consistent with menus?
- Opening Menu link in another tab
- Active class to current link
- How to add class to anchor using wp_nav_menu
- Simple form to add custom links to menu?
- Main menu navigation links and new pages
- custom menu widget where menu title is a link
- 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
- How to create a link-less parent (top level) menu item that doesn’t use an anchor tag
- Menu links URL with PHP GET method
- Classes CSS (Optional) – how do I reference this in php?
- Why does WordPress convert absolute URLs to relative URLs for menu items?
- Parent link need to go first child submenu
- Add a data attribute to list item element in menu
- Links in new menu don’t work
- change link of menu particular tab
- Menu Structure with Links failure to update
- Top menu link anchor href value change after online server?
- Show content of subdomain from specific menu-item?
- Navigational error
- How do I add a link to the menu that has a charector (?) in it?
- Remove link from Page name in navigation bar
- Change menu item order
- Menu System: Custom Links
- Unsual behaviour of navigation Menus
- How to centre menu items on horizontal nav bar? (e.g. make margins equal) [closed]
- Wrapping my ‘s with
- Displaying list of random links using wp_nav_menu
- WordPress removes URL parameters from menu elements when saving the menu
- how to add permalink/slug to wordpress custom link menu item
- Main Menu Hover is Always White
- Split up wp_nav_menu with custom walker
- how to create a menu with all sub categories?
- How to change order of menu items
- Add Commas Between Menu Items?
- Allow html tags in WordPress Custom Menus Description Field
- Add custom attribute to menu item link using Filter
- Remove nav menu or menu item
- Getting stripos error when trying to add menu classes
- Custom Walker for Walker_Nav_Menu
- Make compatible custom menu widget for Twitter Bootstrap
- Different side menu on each page
- Variables within wp_nav_menu
- wp_update_nav_menu_item not saving in multisite API
- Header style different on home and remaining pages
- Pass GET params to URL from a main menu item
- Schedule Page to Menu [duplicate]
- Limit the menu child levels under “admin > appearance > menus”
- display menus on all page except one?
- Show Menu from one WordPress install in another WordPress install
- Is this format possible with a custom Nav Walker class?
- How Do I Add Images To Main Navigation Menu
- Is it still not possible to show separate submenu with “Custom Menu”?
- Three menus – parent / child / sibling
- WordPress Nav Walker – Top menu link with dropdown link not clickable (dropdown opens)
- Rename the label on a menu location which is already defined?
- How to making dynamic URLs for menus in WordPress?
- swap out only main menu for logged in users
- Menu Not Showing on Mobile
- How to change the menu like this?
- Custom ul class
- Removing Submenu from Menu
- Custom link missing as option in my ‘add menu items’
- Mobile navigation javascript problem
- How to style wp_nav_menu?
- How to inject HTML to secondary menu on front end?
- WordPress Navigation default output
- Is there a limit to number of pages displayed for selection in custom menu?
- Convert HTML code to WordPress menu
- Add monthly archives menu and submenu
- wp nav menu – highlighting current page not working properly [closed]
- Hamburger Navigation Menu
- child theme font awesome icons not working