In general you’d add child substitutions for the relevant templates if possible, as Tom mentions in the comments.
Alternately, you can use a wp_nav_menu_args
filter hook to swap in your own arguments prior to WordPress retrieving and rendering the menu:
add_filter( 'wp_get_nav_menu_args', 'wpse406010_primary_nav_menu_args' );
function wpse406010_primary_nav_menu_args( $args ) {
if( $args[ 'theme_location' ] !== 'primary' || $args[ 'walker' ] !== '\Neve\Views\Nav_Walker' )
return $args;
$args[ 'container' ] = false;
$args[ 'menu_class' ] = 'primary-menu-ul nav-ul';
$args[ 'walker' ] = new Aria_Walker_Nav_Menu();
$args[ 'items_wrap' ] = '<ul id="%1$s" class="%2$s">%3$s</ul>';
return $args;
}
Related Posts:
- Customizing Walker_Nav_Menu
- Bootstrap Navwalker not displaying
- Walker_Nav_menu access parent menu name
- Can I use multiple nav_walkers?
- Set custom id to list element walker custom function
- Modifying navigation menu classes with a Walker
- Walker_Nav_Menu Add Strings and Class Name
- Using Different nav_menu_css_class for different nav_walkers
- Mega Menu Walker
- wp_nav_menu: check if the list item has children and add a class to anchor link
- Export navigation menu
- Call custom field into menu item
- Add Page ID class to nav menu items
- Using FlexNav with WordPress [closed]
- Extend walker – navigation, adding data attribute to a tag
- how to change WordPress menu markup/classes
- Trouble with wp_nav_menu, conditional tags and fallback_cb
- Previous & Next on Index Page broken
- `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
- Twenty Eleven theme- have custom landing page, change nav “home” link
- has_children in custom nav_walker
- Adding post excerpt into navigation menu
- Nav Menu – Add class based on meta keys
- posts_nav_link on single.php
- How to get back to same page of post-list – after updating a post
- how to change site tag line for particular pages
- How do I create page navigation linking to each H2 within the page? [closed]
- dropdown navigation menu
- How to add show/hide in navigation setting for pages
- Programmatically (PHP) get the nr. of items in the primary navigation menu
- Change an li class name in a wordpress custom menu walker
- How Do I Add Next and Previous Links On Single Custom Post Type Only?
- Menu with parents, children and or siblings pages display
- Inserting specific images inside navigation menu
- Select first child/subpage item in wp list pages
- Fallback_cb is messing around with containers
- Custom Walker_Nav_Menu issue with variables on PHP 7.3
- WordPress – Responsive navbar doesnt work
- get_adjacent_post – in same term or category not working
- Exclude post format from navigation
- How to add swipe action to wordpress pages
- (Bluehost) navigating to the dashboard via mydomain.com/wp-admin/ results in directory listing
- Using characters to separate menus in navigation bar
- How to hide ‘Home’ button from appearing on supages – twenty eleven theme
- How to remove dropdown from wp_nav_menu
- How to add rel=”nofollow” to wp_list_pages?
- Show children (sub-navigation) of active menu item only
- Switch form Next/Previous to post title
- add a menu item to navigation menu to link to external url
- Using categories on navigation bar instead of pages
- confused about wp_list_pages() function – how to display selected top pages with all their subpages
- Adding a unique ID to each sub-menu
- navbar remove box shadow
- Ecommerce Single Product Next Product Link
- Display all posts thumbnails when viewing a single post
- Is wp3.8 / twenty fourteen’s Sticky Nav & Responsive – core or theme based
- wp_list_pages Hierarchical Help
- Add ID to target navigation link
- Possible to hide Page if no posts from a CPT?
- Listing Sub-Pages & Sub-Sub-Pages
- Next/Previous links doesn’t work in the same category
- the-events-calendar, pagination with tribe_get_events()
- only show children of a nav menu
- Depth problem using wp_list_pages for subnavigation
- How do I add 3rd level of dropdowns to wp_nav_menu array?
- url_to_postid method in walker_nav navigation menu causing exceptionally high TTFB
- Navigating WordPress Articles From Parent Category?
- How to replace home link anchor text with image
- Can I now add a class in the anchor of my menu item with WordPress 5.4?
- is_tax() conditional tag not working
- Adding additional html to the end of the root level in a custom nav walker
- WP Bootstrap Nav (not JS, not missing ID)
- Superfish Dropdown menu broken after WP 4.9.5 upgrade
- Active state does not work with the query string in the url
- Pagination always shows 0 in post section wordpress admin panel
- 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?
- Navigation template
- Connect custom rewrite rules and query variables to wordpress navigation
- Adding direct link to post editor in admin menu
- WordPress get_pages meta_key don’t show page
- Add default wp_nav_menu classes to my custom links
- Check in walker if current page is descendant
- Add dynamic content block to nav section generated by custom walker
- Customize Walker_nav_menu to show posts if item is category
- Add the “.current-menu-item” class to tag?
- Adding nav menu name from plugin options dynamically
- How to accomplish a child page navigation?
- Walker for menus
- All of the “more results” and navigation links lead to a 404 error
- How can I hide the TOP Navigation menu if users are not logged in [duplicate]
- determine if specific page is in list?
- Different coloured navigation links in Twenty Eleven themes
- how can i get the page_ID in nav li [closed]
- I would like to hide menu on desktop but still have it visible on small screen
- How to add nofollow to the_post_navigation?
- Apply walker_nav_menu_start_el but only to one menu