Skip to content

3 or more level menus in v6 #853

Answered by crftwrk
mrskater asked this question in Q&A
Sep 30, 2024 · 2 comments · 11 replies
Discussion options

You must be logged in to vote

Hi, we have several examples for v5, here is a new one for v6:

Step 1

Register a modified navwalker that allows more than 2 levels depth in child's functions.php:

/**
 * Register a navwalker that allows 3 ore more levels depth 
 * https://github.com/imanishpushkar/bs5-navwalker
 */
function bootscore_register_navwalker() {

   class bootstrap_5_wp_nav_menu_walker extends Walker_Nav_menu {
    private $current_item;
    private $dropdown_menu_alignment_values = [
      'dropdown-menu-start',
      'dropdown-menu-end',
      'dropdown-menu-sm-start',
      'dropdown-menu-sm-end',
      'dropdown-menu-md-start',
      'dropdown-menu-md-end',
      'dropdown-menu-lg-start',
      'dropdown-me…

Replies: 2 comments 11 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by crftwrk
Comment options

You must be logged in to vote
11 replies
@FrankChandler
Comment options

@crftwrk
Comment options

@FrankChandler
Comment options

@crftwrk
Comment options

@FrankChandler
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment