Is there a way to insert div under some of navigation items in wordpress?

I have the below HTML which I want to translate into wordpress function "**wp_nav_menu()**"

 <ul class="nav navbar-nav">
       <li id="about-menu">
          <a href="#"> About Us </a>
          <div id="about-us"> 
              ..... 
              inner div(s) and 
              Paragraphs etc 
              ...... 
          </div>
       </li>
       <li id="contact-menu">
          <a href="#"> Contact Us </a>
          <div id="contact-us"> 
              ..... 
              inner div(s) and 
              Paragraphs etc 
              ...... 
          </div>
       </li>
       <li><a href="">News</a></li>
    </ul>

Any Idea on how to do it?

Solutions

You can create a custom nav walker. There are no docs on wordpress.org, but you could simply take a look at an existing walker

Similar questions

Insert some text after a specific div into WordPress frontend
I am customizing the front end of Woocommerce, so I'd like to add the text "/ Per Month" after my final price before the user clicks the Add to Cart Button. I have tried through javascript jQuery('.woocommerce-variation-price').append(" / month") but while it works when I run it from the console it fails when I run it t...
Is there a way of storing posts and pages under the same hierarchy?
I'm working on a site which needs to have pages and posts sorted into the same categories. The pages have their own individual hierarchy structure. Is there a way to do this using a custom taxonomy?
Is there a way to group specific CPTs under a single dashboard menu item?
My next project may involve dozens of CPTs (it's a ad board and each category would be a CPT, for example CARS and associated special attributes like mileage, gas/petrol and such as custom fields). By default CPTs are accessed from a menu item in dashboard left sidebar. I don't want left sidebar to be 6 screens tall so is there a simple way to grou...
Is there a way loading an existing page under a fake url?
I want to rewrite an existing path page to a fake directory. www.website.com/company/events -> fake path, it doesn't exist but it should load /events/ page. www.website.com/events Is there a way to do it in Wordpress? This is what I tried in .htaccess but it does't work. P.S: I want to mention the /events/ page is generated by a WP plugin called Ev...
Wordpress own carousal showing 10 items but there are total 17 items in loop
I have a wordpress site. And I have implemented owl carousal. There are total 17 items in loop. But carousal showing 10. If I <pre></pre> inside the loop, then all 17 shows. What should I do? http://crucialappconcepts.com/#portfolio I have this script at the end of my page AND MY HTML CODE
Insert a div every three items in the wordpress loop (php)
I am trying to add an image after every three posts in the wordpress loop. Here's the loop: My guess would be to insert a counter, but I'm not sure about the placement. My guess. But even if this would work (not tested), the counter should reset after the image has been inserted. How should you do that? Summary: insert an image after every three po...

Also ask

We use cookies to deliver the best possible experience on our website. By continuing to use this site, accepting or closing this box, you consent to our use of cookies. To learn more, visit our privacy policy.