Sub menu three levels depth #267
-
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Hi I am working on a development site and the sub -> sub menu items are not showing The menu "who we are" should have 2 more levels of items as per the menu i have set-up in the screenshot I am using this code |
Beta Was this translation helpful? Give feedback.
-
By default Bootstrap does not support submenus inside submenus. Maybe @crftwrk has some alternative code to get it to work. |
Beta Was this translation helpful? Give feedback.
-
As @justinkruit wrote, Bootstrap does not support a third level and nav-walker doesn't support it too. Check this issue AlexWebLab/bootstrap-5-wordpress-navbar-walker#19. @imanishpushkar modified the nav-walker AlexWebLab/bootstrap-5-wordpress-navbar-walker#19 (comment) to three level depth. Register the nav-walker is a pluggable function. Simply add new nav-walker to your child and override function. function register_navwalker() {
require_once('inc/class-bootstrap-5-navwalker.php'); // Change new path and file name
// Register Menus
register_nav_menu('main-menu', 'Main menu');
register_nav_menu('footer-menu', 'Footer menu');
} Does this help? |
Beta Was this translation helpful? Give feedback.
-
Thanks i have a solution now here https://github.com/imanishpushkar/bs5-navwalker |
Beta Was this translation helpful? Give feedback.
Thanks i have a solution now here https://github.com/imanishpushkar/bs5-navwalker