Hello guys I made bootstrap menu that is a little bit more complexed and I want to convert it to WordPress. I have my main menu in the middle, logo on the left, and on the right I have search bar and dropdown menu. I read a lot on this subject but nothing I tried worked.
This is my HTML code for nav:

<div class="navbar navbar-default navbar-fixed-top" role="navigation">
    <hr class="blueLine">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>      
            </button>   
            <a class="navbar-brand" href="<?php bloginfo('url'); ?>">
                <img src="<?php bloginfo('template_directory'); ?>/img/fresiusLogo.png">
            </a>  
        </div>
        <div class="navbar-collapse navbar-center collapse">
            <ul class="nav navbar-nav navbar-center">
                <li class=""><a href="enternal.html">Enternal <br> Nutrition</a></li>  
                <li class=""><a href="indi.html">INDI <br> Partnership</a></li>  
                <li class=""><a href="parental.html">Parental <br> Nutrition</a></li>  
            </ul>
            <div class="col-sm-3 col-md-3 pull-right">
                <form class="navbar-form" role="search">
                    <div class="input-group">
                        <input type="text" class="form-control" placeholder="Search" name="srch-term" id="srch-term">
                        <div class="input-group-btn">
                            <button class="btn btn-default" type="submit"><i class="fa fa-search" aria-hidden="true"></i></button>
                        </div>
                    </div>
                </form>                        
                <li class="dropdown">
                    <span>Fresenius Kabi Globa</span>
                    <a class="dropdown-toggle" data-toggle="dropdown" href="#">Select Website
                    <span class="caret"></span></a>
                    <ul class="dropdown-menu">
                      <li><a href="https://www.google.com/">Test 1</a></li>
                      <li><a href="https://www.google.com/">Test 2</a></li>
                      <li><a href="https://www.google.com/">Test 3</a></li>
                    </ul>
                </li>
            </div>
        </div>      
    </div>  
</div>

I have tried following instructions I found online but none worked for me I have also tried using wp-bootstrap-navwalker, but could not implement it with my code. One of my issues is for example when I click on my dropdown menu it doesn’t do anything cause I’m targeting # is there anyway to target # with php ? Does anyone have any idea how to convert this to Worpress ?

Read more here: Convert bootstrap navigation to wordpress


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: