I want to ask is it possible to display menus and submenus without using Walker Nav Class? I'm just to happen when I download a free theme using bootstrap and I do not see a start_el for navigating the menus and submenus. Thanks in advance.
I want to ask is it possible to display menus and submenus without using Walker Nav Class? I'm just to happen when I download a free theme using bootstrap and I do not see a start_el for navigating the menus and submenus. Thanks in advance.
Share Improve this question asked Oct 28, 2019 at 8:24 Lucifer LeviLucifer Levi 932 silver badges11 bronze badges1 Answer
Reset to default 0I'm not quite sure what you mean. The wp_nav_menu()
will automatically use the Walker_Nav_Menu
Class by default. It's not necessary to use a custom walker for a drop down menu ( or submenu ). The wp_nav_menu()
accepts a few arguments and one of those is depth
. If the depth argument is set to 1 then it will limit the menu to top level items.
Really, it's up to your theme to use CSS and style these dropdown menus so that they are functional.