enter image description here

I’m new in WordPress so I’m sorry if I repeat question.
I have theme in HTML/CSS and I want move theme to WordPress and I have problem with my menu. Below I show my problem.
I have menu in HTML:

In WordPress my menu is:

HTML is:

<nav class="navbar-default sidebar pb-30">
<ul class="nav navbar-nav nav navbar-nav side-nav text-center">
<li >
    <a href="#">Home</a>
</li>  
<li >
    <a href="#">About Us</a>
</li>
<li>
    <a aria-expanded="true" class="collapsed" href="javascript:;" data-toggle="collapse" data-target="#colapse-item-1">Gallery
        <i class="ti-minus"></i> 
        <i class="ti-plus"></i>
    </a>
    <ul style="" aria-expanded="true" id="colapse-item-1" class="collapseItem collapse">
        <li>
            <a href="#">
                <i aria-hidden="true"></i>Gallery - 1

            </a>
        </li>
        <li>
            <a href="#">
                <i aria-hidden="true"></i>Gallery - 2

            </a>
        </li>
        <li>
            <a href="#">
                <i  aria-hidden="true"></i>Gallery - 3

            </a>
        </li>
        <li>
            <a href="#">
                <i aria-hidden="true"></i>Gallery - 4

            </a>
        </li>
        <li>
            <a href="#">
                <i aria-hidden="true"></i>Gallery - 5

            </a>
        </li>   
        <li>
            <a href="#">
                <i aria-hidden="true"></i>Gallery - 6

            </a>
        </li>                                   
    </ul>
</li>    
<li class="active"><a href="#">Contact</a></li> 

At this moment I display menu using:

<?php                         
$defaults = array (
  'theme_location' => 'menu',
  'container' => 'nav',
  'menu_class' => 'nav navbar-nav nav navbar-nav side-nav text-center'                     
 );                        
wp_nav_menu( $defaults );                        
?>  

But I don’t know how correctly display/hidden submenu, how check link is children and display his parent links.
How add

<ul style="" aria-expanded="true" id="colapse-item-1" class="collapseItem collapse">     

in second ul in my menu.

Read more here: I can’t correctly display menu


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: