title: Bootstrap 4 WP Navwalker Multi-Level Dropdown
body: <p>Essentially i'm trying to make the WP Navwalker dropdown three levels instead of it's default 2.</p>
  <p>I've found tutorials on this but they seem to be for Bootstrap 3 as I don't have the <strong>.dropdown-submenu class</strong>.</p>
  <p>Here is an example of what i'm trying to do but this didn't work for me (i'm guessing because I don't have the <strong>.dropdown-submenu</strong> class)</p>
  <p><a href="https://joeybabcock.me/blog/html/bootstrap-multi-level-dropdown-menus-in-wordpress/" rel="nofollow noreferrer">https://joeybabcock.me/blog/html/bootstrap-multi-level-dropdown-menus-in-wordpress/</a></p>
  <pre><code>&lt;div class=&quot;container header_primary py-4 fw-c&quot;&gt;
      &lt;div class=&quot;row&quot;&gt;
          &lt;div class=&quot;col-lg-3 col-md-4 col-sm-6 col-6 d-flex align-items-center&quot;&gt;
              &lt;a href=&quot;&lt;?php bloginfo('url'); ?&gt;&quot;&gt;&lt;img src=&quot;&lt;?php echo get_template_directory_uri(); ?&gt;/images/logo-black.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;
          &lt;/div&gt;&lt;!-- .site-branding --&gt;
  
          &lt;div class=&quot;col-lg-8 col-md-8 col-sm-6 col-6 header_navigation justify-content-end align-items-center&quot;&gt;
              &lt;nav class=&quot;primary_style navbar navbar-expand-lg navbar-expand-md navbar-light float-md-right d-md-flex d-block&quot;&gt;
                  &lt;button class=&quot;navbar-toggler float-right&quot; type=&quot;button&quot; data-toggle=&quot;collapse&quot; data-target=&quot;#bs4navbar1&quot; aria-controls=&quot;mobileNav&quot; aria-expanded=&quot;false&quot; aria-label=&quot;Toggle navigation&quot;&gt;
                      &lt;span class=&quot;navbar-toggler-icon&quot;&gt;&lt;/span&gt;
                  &lt;/button&gt;
                   &lt;?php
                   wp_nav_menu([
                       'menu'            =&gt; 'main-nav',
                       'theme_location'  =&gt; 'top',
                       'container'       =&gt; 'div',
                       'container_id'    =&gt; 'bs4navbar',
                       'container_class' =&gt; 'collapse navbar-collapse',
                       'menu_id'         =&gt; false,
                       'menu_class'      =&gt; 'navbar-nav',
                       'depth'           =&gt; 3,
                       'fallback_cb'     =&gt; 'bs4navwalker::fallback',
                       'walker'          =&gt; new bs4navwalker()
                   ]);
                   ?&gt;
              &lt;/nav&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>