0

I am using a custom nav walker and would like to create a tree menu.

Here is the HTML Structure for the full navigation

<ul class="navbar-nav">
                                <li class="has_dropdown">
                                    <a href="index.html">HOME</a>
                                    <div class="dropdowns dropdown--menu">
                                        <ul>
                                            <li>
                                                <a href="index.html">Home Multi Vendor</a>
                                            </li>
                                            <li>
                                                <a href="index-single.html">Home Two Single User</a>
                                            </li>
                                            <li>
                                                <a href="index3.html">Home Three Product</a>
                                            </li>
                                        </ul>
                                    </div>
                                </li>
                                <li class="has_dropdown">
                                    <a href="all-products-list.html">all product</a>
                                    <div class="dropdowns dropdown--menu">
                                        <ul>
                                            <li>
                                                <a href="all-products.html">Recent Items</a>
                                            </li>
                                            <li>
                                                <a href="all-products.html">Popular Items</a>
                                            </li>
                                            <li>
                                                <a href="index3.html">Free Templates</a>
                                            </li>
                                            <li>
                                                <a href="#">Follow Feed</a>
                                            </li>
                                            <li>
                                                <a href="#">Top Authors</a>
                                            </li>
                                        </ul>
                                    </div>
                                </li>

Here is the HTML call for the wp_nav_menu:

                            <?php 
                        $args = array(

                            'container'       => 'ul',
                            'theme_location'  => 'primary-menu',
                            'menu_class'      => 'navbar-nav',


                           );
                           wp_nav_menu( $args );
        ?>              

How can I do this with Walker function

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.