title: bootstrap 4 dropdown menu in wordpress
body: <p>I am building a UI in Bootstrap 4 and dropping onto WordPress. The navbar menu has proven to be a challenge. I have meticulously followed instructions on how to do this little retrofit, but have only limited success. </p>
  
  <p>This I got working but with no dropdown</p>
  
  <pre><code>https://code.tutsplus.com/tutorials/how-to-integrate-a-bootstrap-navbar-into-a-wordpress-theme--wp-33410 
  </code></pre>
  
  <p>But the one with the Dropdowns I couldn't get going at all</p>
  
  <pre><code>http://simonpadbury.github.io/2016/03/09/bootstrap-4-navbar-with-dropdowns-for-wordpress.html 
  </code></pre>
  
  <p>I feel like there is something missing, a step or two that is assumed perhaps. </p>
  
  <p>Bootstrap 4 is loaded up and running in WordPress. In functions.php</p>
  
  <pre><code>require_once('navwalker/navwalker4.php'); 
  </code></pre>
  
  <p>which is what I am calling the Nav Walker for the Dropdown. (Thats the second link above that specifically addresses BS4 and the Dropdown in WP).</p>
  
  <p>At the end of his Nav Walker file, there is this register,</p>
  
  <pre><code>register_nav_menu('primary', __('primary', 'promotionstoretheme'));
  </code></pre>
  
  <p>And finally there is this in the header.php</p>
  
  <pre><code>&lt;?php
       wp_nav_menu( array(
        'theme_location' =&gt; 'navbar',
        'container'      =&gt; false,
        'menu_class'     =&gt; 'nav navbar-nav',
        'fallback_cb'    =&gt; '__return_false',
        'items_wrap'     =&gt; '&lt;ul id="%1$s" class="%2$s"&gt;%3$s&lt;/ul&gt;',
        'depth'          =&gt; 2,
        'walker'         =&gt; new bootstrap_4_walker_nav_menu()
        ) );
   ?&gt;
  </code></pre>
  
  <p>I am really trying to understand it so I can formulate a clean and simple solution. Perplexed at this point. The names of the menu locations do not seem to matter much. Simple problem I am sure.</p>
  
  <p>'preciate any insight. Thanks!</p>