wp_nav_menu() showing list in a different Position?

Viewed 33

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>

</li>

This function should show list items within div element but what I get is that it 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 this attribute to the args array ـــ the output list appears outside of its div container. What am I doing wrong?

0 Answers
Related