Answer the question
In order to leave comments, you need to log in
How to change wp_nav_menu php code to change html markup?
There is a menu that is built using the wp_nav_menu function. A sub-menu drops out of one item.
It is required to make it so that in one of the li-elements there is an input, followed by an input.
it should look like this:
<ul>
<li><a></a></li>
<li>
<a></a>
<input type="checkbox" name="toggle" id="menuBox" class="toggleMenu">
<label for="menuBox" class="toggleMenu"><i class="icon-menu">Меню </i></label>
<ul>
<li></li>
<li></li>
<li></li>
</ul>
</li>
<li><a></a></li>
<li><a></a></li>
</ul>
Answer the question
In order to leave comments, you need to log in
Hello!
Explore adding a custom walker for the menu. This way you can style and generally edit the menu.
Ready walker for bootstrap - https://github.com/wp-bootstrap/wp-bootstrap-navwalker
Useful link - https://codex.wordpress.org/Class_Reference/Walker
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question