最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

walker - Is it possible to display the Navigation Menu without using Walker_Nav Class

programmeradmin0浏览0评论

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 badges
Add a comment  | 

1 Answer 1

Reset to default 0

I'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.

发布评论

评论列表(0)

  1. 暂无评论