Okays.. i’ve solved this in my own way. i have added the following function in functions.php file
class ik_walker extends Walker_Nav_Menu{
//start of the sub menu wrap
function start_lvl(&$output, $depth) {
$output .= '<div class="dropdownContain">
<div class="dropOut">
<div class="triangle"></div>
<ul>';
}
//end of the sub menu wrap
function end_lvl(&$output, $depth) {
$output .= '
</ul>
</div>
</div>';
}
}
and in the header.php file menu section added this wp_nav_menu
wp_nav_menu( array(
'container' => false,
'menu_id' => 'nav',
'depth' => 0,
'theme_location' => 'primary',
'walker' => new ik_walker())
);
Related Posts:
- Display only page specific sub menu items using Custom Walker
- Add class to top level menu item if it has multiple child levels
- Simple Navigation Walker – Wrapper-class around first sub-menu
- Custom Nav Walker sub-menu HTML construct
- Check if wp_nav_menu items have submenus
- Add div to specific sub-menu
- Nav walker, bootstrap: Display 3rd level items under 2nd level
- Sub-Pages only of menu items in current branch using a custom menu
- How to display dynamic content in start_lvl function
- How to add a submenu toggle button inside all “li” elements that have a submenu?
- Main Menu and Sub Menu Items for Footer
- How to add ID attribute to each submenu?
- Change submenu markup
- getting the current sub item out of total sub items in a given dropdown (custom walker)
- How to Add support for sub-menu item description in wordpress?
- How can I creat custom menu with bootstrap
- Menu walker: how to tell if a sub menu contains submenus?
- Where to place a svg chevron down in my custom walker?
- Displaying a part of a menu containing the page the user is currently viewing and only it’s immediate children
- Conditional Nav Menu Inside Nav Menu Across Multisite Sites
- Display a portion/ branch of the menu tree using wp_nav_menu()
- How to count nav menu items?
- Does Extending Multiple Nav_Menu_Walkers Allow Nested Menus?
- Call custom field into menu item
- Add Page ID class to nav menu items
- Pass a parameter to a menu walker
- How to drag multiple menu items at once in WordPress?
- Customizing the a tag with Semantic UI
- Automatically Add New Tags to Sub-menu
- how to only add a top-level admin menu without it creating a sub-level-menu
- how to automatically generate hierarchical menus from hierarchy of pages?
- wp_nav_menu – page template name as item class
- `start_el` depth argument in custom nav walker always evaluates to zero
- Adding post excerpt into navigation menu
- Editing WordPress Nav Menu Walker
- 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
- View h2 content tags of a page in sub menu
- Change an li class name in a wordpress custom menu walker
- Custom walker nav – Add sequential number as class
- Getting menu items like get_pages
- add_submenu_page function to show videos table
- WP Menu Walker – How to know total depth from inside the start_lvl() method
- How do I add recent posts to the menu?
- How to create this Custom Walker Menu
- Automatically list top level menu item child pages
- Custom Nav Walker sub-menu
- Create a MegaMenu using a walker and the start_lvl function
- Check if menu_item has children or has parent
- Creating a menu containing categories and authors
- wp_nav_menu add class to child item with sub child
- How to use a start_el variable in start_lvl
- Split into two seperate unordered lists with custom walker
- creating a custom walker class
- Insert a div class inside wordpress menu
- Wrapping link and .sub-menu with wp_nav_menu
- Show children (sub-navigation) of active menu item only
- wp_nav_menu check both hierarchy fail?
- Get parents child pages
- Walker Class: Output Parent Description and Featured Image right after sub-menu?
- Modifying the walker to insert parent’s description above sub menus
- How to add scroll IDs to WordPress menu anchors
- wp_list_pages Hierarchical Help
- custom walker class for own menu?
- An alternative to WordPress’s built-in menu functionality
- Dropdown primary navigation menu not working
- Is there any way to change the CSS class applied to 2nd level sub menu ul’s?
- Link after WordPress
- Add attributes to wrapper html generated by wp_nav_menu
- url_to_postid method in walker_nav navigation menu causing exceptionally high TTFB
- Add Different Class on Different Ul in twenty-twentyone theme
- insert an HTML element if there is a submenu only
- wp_nav_menu container style args
- Structuring Nav Menu and Background Custom page (Help)
- How can I click the parent menu then redirect to a special URL?
- Stuck while adding bootstrap navwalker class
- Adding additional html to the end of the root level in a custom nav walker
- wordpress custom menu – show parents, siblings, children depending on depth
- WordPress customizing a walker menu class
- Generate Submenu based on Parent Page using If Statement
- how do you create this customize menu using wp_nav_menu function?
- WordPress menu issue after update
- Cannot add home page url to menu with #
- Add dynamic content block to nav section generated by custom walker
- How to create a menu super voice in WP?
- How can I modify wp_nav_menu with walker?
- Walker for menus
- Use wp_nav_menu to dynamically generate child menus
- Menu support for touch devices
- Change sub-menu css class
- ID of parent Menu
- How was this menu system created?
- How to display a submenu as a popup when clicking a button?
- Broken drop down menu using Bootstrap and navwalker class
- how to mage the submenu open on wordpress active page
- Display sub menus as separate lists
- how can i get the page_ID in nav li [closed]
- WordPress nav Walker – Bootstrap 5.2.3 – submenu not opening