Skip to main content
1 of 2

wp_nav_menu() showing list in a different Position?

While trying to add menu list as the following

<li>
 <div class="dropdown-menu" aria-labelledby="navbarDropdown">

      <?php 
           wp_nav_menu(array(
               'theme_location' => 'header_menu_location',
               'echo' => false,
               'items_wrap' => '%3$s'
            ));

      ?>
                    
</div>
This function should show a list of items within div element but what I get is that list is being shown right after the outer li element. What's even weird about it is that when I do not use attribute 'items_wrap' the output is showing properly inside of the div container, only when I add to the args array the output list appears outside of its div container. What am I doing wrong?