Your menu type is:
'menu-item-type' => 'Custom',
But if we look in wp_update_nav_menu_item
:
if ( 'custom' != $args['menu-item-type'] ) {
custom != Custom
, so your URL gets stripped
Related Posts:
- Retrieving a list of menu items in an array
- Add Javascript to WordPress Menu
- Add custom menu item using wp_nav_menu_items filter
- register_nav_menus() won’t register menus
- Custom Post Types posts as submenus in Nav Menu
- Filter out built-in wp_nav_menu classes but keep custom class
- How to get a different mobile menu than desktop menu in the twentytwelve child theme
- HTML Bootstrap navigation menu to WordPress menu using wp_nav_menu
- Getting URL value from menu item by ID
- Is it possible to add a filter for the output of nav-menu items in admin?
- Adding html elements to wp nav menu
- Bar separated navigation by extending Walker_Nav_Menu
- How to change menu according to the language?
- insert element inside wp menu list item
- WordPress Menu Disappears when $query->query_vars[‘meta_key’] is set
- how do I delete (not exclude) a menu item from navigation bar
- show only a given level in nav menu
- How to style current page menu item when using a walker
- Anchor only wp_nav_menu
- add_action for saving a custom menu
- Getting post content within wp_nav_walker
- Nav Walker current menu item not displaying
- Navigation (wp_nav_menu) refuses to nest within parent element
- Removing strip_tags not working on nav_menu_description
- Wp_Nav_Menu – Identify the last menu item
- Keeping ‘current-menu-item’ highlight of navigation menu?
- Hide Menu Unless Logged In
- Possible to add a dynamic link to a sub-menu via wp_nav_menu_items?
- Populating main menu from external JSON API
- HTML in Menu Items disappear on save
- Fragment URL in navigation item without a custom link
- Update body class based on menu
- How to add fixed position in menu class for Twenty Twelve theme?
- How do I separate link levels in a custom menu walker?
- Possible Menu Hack?
- how can i add css class on current page in wordpress wp_nav_menu
- How to rewrite the output of wordpress nav menu?
- Return Page/Post ID’s of Child WP_Nav_Menu items
- Allow users with Editor role to edit menus (without a plugin)
- Add custom links like functionality
- I need my dropdown sub-sub-menu box to show sub-menu title above
- Custom Links menu items include in Search Results
- When clicking on menu item not going to specific page
- Menu items suddenly are displayed all over the page [closed]
- Custom navigation structure with walker class
- Allowing HTML in Menu Descriptions
- How to add class to parent a tag with a sub menu
- CSS Classes (optional) on menu is not showing
- Listing Child Pages in a Certain Order?
- Why is only the first operation run in my loop – except for on the last repeat? [closed]
- Move Sticky Nav Menu Below WordPress Tool bar when tool bar enabled
- Prevent menu from loading in a page template [duplicate]
- WordPress + Bootstrap [closed]
- How to hide a menu from public, but share content with a private link [closed]
- Add custom link on the fly to nav menu
- WordPress menu>Custom Link: removing my link formatting and adding %20
- URL links consistent with menus?
- Strange menu behaviour wordpress admin [duplicate]
- Wp_list_pages not showing children with custom page template
- How to check if current page is a parent item or child item in a given menu
- changing the labels inside appearance -> menus for some for the fields
- Lost admin “manage_link” capability WordPress. No “Links” menu item in admin menu
- How to add active class to separate page link?
- Buggy wp_nav_menu?
- dropdown menu, with walker
- Add function to custom menu
- if role is logged in then do something
- WP Menu Rollover Nav Item and Effect DIV Elsewhere
- Custom menu with additional logic for display
- Menu item that hides when you click the previous submenu
- Putting footer links into different columns
- How to create a mobile menu full screen overlay using Understraps Bootstrap 4 theme
- adding drop down menu item to existing menu
- wordpress walker add class to submenu a href
- Display searchform in the menu
- How to Hide/Remove Pages section in Menus (Dashboard)
- Unable to remove page from primary menu
- Show navigation header menu by post and categery
- wp-nav menu with custom walker , how to remove a tag if it has any submenu
- How to add a toggle on the left side of my page?
- How to add buddypress sub-menu items to other menus
- Custom location for menu
- Always show wordpress submenu on responsive header menu
- add custom entries to menu options
- Showing a link with Javascript based on log-in status
- Placing generated list into drop-down on custom menu
- Building Menus with the latest posts included
- Cannot control wp_nav_menu properly
- How to add drop down sub menu from database fields in the particular menu slug
- wordpress superfish dropdown menu
- Drop down menus css in custom menus
- Creating a custom menu
- how to assign an ID to a wordpress menu
- Keeping my Sub Menu open when hovering on its list items
- How to change the markup created by menu item only on chosen items?
- How to disable permalink of a particular menu item?
- Active Navigation Class Based on URL on icon
- Rename Menu icon in Twenty seventeen theme
- WordPress Menu – Adding a new dynamic element to the menu
- One item on menu is not clickable when it should be