0
<!-- Mobile Menu Desktop -->
<div class="show-mobile">
    <div class="site-menu">
        <ul class="menu">
        <li><a href="#">Link</a></li>
            <li><a href="#">Link</a></li>
            <li><a href="#">Link</a></li>
                <ul class="dropdown-menu">
                        <li><a class="dropdown-item" href="#">Link</a></li>
                        <li><a class="dropdown-item" href="#">Link </a></li>
                        <li><a class="dropdown-item" href="#">Link</a></li>
                        <li><a class="dropdown-item" href="#">Link</a></li>
                        <li><a class="dropdown-item" href="#">Link</a></li>
                        <li><a class="dropdown-item" href="#">TLink</a></li>
                    </ul>
            </li>
            <li><a href="#">Link</a></li>
            <li><a href="#">Link</a></li>
            <li><a href="#">Link</a></li>
            <li><a href="#">Link</a></li>
        </ul>
        </div>
    </div>
    <small> Copyright 2022</small> </div>
</aside>
<nav class="navbar">
<div class="container">

<!-- Desktop Menu -->
<div class="logo"> <a href="#"><img src="<?php bloginfo('template_url');?>/img/logo.png" alt="Image"></a> </div>

  

<div class="site-menu">
<ul class="menueffect">
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link 
</a>
    <ul class="dropdown-menu">
        <li><a class="dropdown-item" href="#">Link</a></li>
        <li><a class="dropdown-item" href="#">Link </a></li>
        <li><a class="dropdown-item" href="#">Link</a></li>
        <li><a class="dropdown-item" href="#">Link</a></li>
        <li><a class="dropdown-item" href="#">Link</a></li>
        <li><a class="dropdown-item" href="#">TLink</a></li>
        </ul>
</li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
</ul>
</div>
<div class="hamburger-menu"> <span></span> <span></span> <span></span> </div>
<div class="navbar-button"> <a href="#"><i class="flaticon-call"></i>&amp;nbsp;&amp;nbsp;&amp;nbsp;123 456 789</a> </div>
</div>
</nav>

Hello,

I want to create a menu structure like this. For the first time, I will set up a theme with Wordpress. There is a place where I hang out. How can I define these menus with php code. I tried a lot but I keep getting errors. I'm waiting for your help.**

4
  • You will need a custom nav menu walker. Google for bootstrap navwalker.
    – Abhik
    May 14 at 6:33
  • Hello Thank you for your comment. Bootstrap codes already exist, the menu here is Html5 structure, I want how we can define them with WordPress pHp codes. What do I need to write in my functions.php file and this code is in the header. PHP is also. How can I define a pHp here?
    – Adam
    May 14 at 10:37
  • As Abhik said, the conversion of a WordPress navigation menu structure to HTML is controlled by a "Nav_Walker." To substantially change the HTML produced for a menu, you must extend the class to make the necessary modifications - or find a pre-built one which fits your needs - then pass it to a wp_nav_menu() call or use a wp_nav_menu_args filter. If you take a run at it we can help you from there
    – bosco
    May 14 at 16:53
  • I already solved the problem, thank you. Fixed issue with bootstrap navwalker.
    – Adam
    May 18 at 11:59

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.