Displaying child menu items in WordPress
-
I make a WordPress theme. There are submenus in the main menu. Found what can be done by extending the class Walker_Nav_Menu. Please, tell me how to implement correctly.
<div id="nav-bottom"> <div class="container"> <!-- nav --> <ul class="nav-menu"> <li class="has-dropdown"> <a href="index.html">Home</a> <div class="dropdown"> <div class="dropdown-body"> <ul class="dropdown-list"> <li><a href="category.html">Category page</a></li> <li><a href="blog-post.html">Post page</a></li> <li><a href="author.html">Author page</a></li> <li><a href="about.html">About Us</a></li> <li><a href="contact.html">Contacts</a></li> <li><a href="blank.html">Regular</a></li> </ul> </div> </div> </li> <li><a href="#">Fashion</a></li> <li><a href="#">Lifestyle</a></li> <li><a href="#">Technology</a></li> <li><a href="#">Health</a></li> <li><a href="#">Travel</a></li> </ul> </div> </div> <!-- /Main Nav -->
Menu form as follows:
<div id="nav-bottom"> <div class="container"> <!-- nav --> <ul class="nav-menu"> <?php wp_nav_menu(array( 'theme_location' => 'primary', 'walker' => new Callie_Walker_Nav_Menu(), )); ?> </ul> </div> </div>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Displaying child menu items in WordPress’ is closed to new replies.