Wp Nav菜单walker呈现自定义结构

时间:2017-03-16 13:55:00

标签: php wordpress twitter-bootstrap wp-nav-walker

我一直试图为我的菜单设置这个结构:

<nav>
    <div class="main-nav">
        <div class="dropdown exploreus">
            <a href="#" class="dropbtn">Main Item</a>
            <div class="dropdown-content">
                <div class="illustration">
                    <img src="images/explore.png" alt="" />
                </div>
                <a href="#">Sub 1</a>
                <a href="#">Sub 2</a>
                <a href="#">Sub 3</a>
                <a href="#">Sub 4</a>
                <a href="#" class="parent-link">Sub 5</a>
                    <div class="dropdown-content-2">
                        <a href="#">Sub Sub 1</a>
                        <a href="#">Sub Sub 2</a>
                        <a href="#">Sub Sub 3</a>
                    </div>
            </div>
        </div>
    </div>
</nav> 

我尝试使用导航菜单步行器,但它不适用于我。我尝试编辑这个:https://github.com/wp-bootstrap/wp-bootstrap-navwalker/blob/master/wp-bootstrap-navwalker.php

没有运气任何建议

0 个答案:

没有答案