Displaying Nav Menu


I want to ask if this <?php wp_nav_menu( array('theme_location' => 'primary') ); ?> get all the sub-menu automatically? I saw this one of my downloaded theme and it displays all the submenu only using this and css code. I am curious why it display the submenu even though it doesn’t uses walker class for example like this wp_nav_menu( array(
'theme_location' => 'primary',
'depth' => 2, // 1 = no dropdowns, 2 = with dropdowns.
'container' => 'div',
'container_class' => 'collapse navbar-collapse',
'container_id' => 'bs-example-navbar-collapse-1',
'menu_class' => 'navbar-nav mr-auto',
'fallback_cb' => 'WP_Bootstrap_Navwalker::fallback',
'walker' => new WP_Bootstrap_Navwalker(),
) );
with another walker file like this https://github.com/wp-bootstrap/wp-bootstrap-navwalker. I am new to wordpress and I hope someone would enlighten me. Thanks

, Lucifer Levi 2 years 2019-11-21T01:05:31-05:00 0 Answers 93 views 0

Leave an answer