Convert a wordpress dropdown menu list to div

enter image description here

Am new to wordpress

This is my code which displqays the menu:

  <?php wp_nav_menu( array( 'theme_location' => 'header-menu'
     ,'menu_class' => 'nav navbar-nav' ) );
     ?>

In my menu i have the following structure

When i perform inspect element i get the following structure

<ul>
  <li>
    <ul> ... other list items...</ul>
  </li>
  <li>
    <ul> ... other list items...</ul>
   </li>
</ul>

What am looking to achieve is

 <ul>
   <li >
          <div class="dropdown-menu">
            <div class="column col-lg-2 col-md-3">
               <a href="category.html">Clothing</a>
              <div>
                <ul>
                  <li><a href="category.html">Men <span>&rsaquo;</span></a>
                    <div class="dropdown-menu">
                      <ul>
                        <li><a href="category.html">Sub Categories</a></li>

                      </ul>
                    </div>
                  </li>
                  <li><a href="category.html" >Women</a> </li>
                  <li><a href="category.html">Girls<span>&rsaquo;</span></a>
                    <div class="dropdown-menu">
                      <ul>
                        <li><a href="category.html">Sub Categories </a></li>

                      </ul>
                    </div>
                  </li>
                  </li>
                </ul>
              </div>
            </div>

          </div>
        </li>
</ul>

Are there more configurations needed to enable this

Read more here: Convert a wordpress dropdown menu list to div

Leave a Reply

Your email address will not be published. Required fields are marked *