我一直在想这个问题。我需要覆盖wordpress导航系统的默认输出。
现在就像:
<ul id="main-nav">
<li class="menu-item">Parent Menu Item</li>
<ul id="sub-menu">
<li class="sub-menu-item">Parent Menu Item</li>
<li class="sub-menu-item">Parent Menu Item</li>
<li class="sub-menu-item">Parent Menu Item</li>
</ul>
<li class="menu-item">Parent Menu Item</li>
<ul id="sub-menu">
<li class="sub-menu-item">Parent Menu Item</li>
<li class="sub-menu-item">Parent Menu Item</li>
<li class="sub-menu-item">Parent Menu Item</li>
</ul>
<li class="menu-item">Parent Menu Item</li>
<ul id="sub-menu">
<li class="sub-menu-item">Parent Menu Item</li>
<li class="sub-menu-item">Parent Menu Item</li>
<li class="sub-menu-item">Parent Menu Item</li>
</ul>
</ul>
我想做的是:
<div class="main-nav-wrap">
<div class="container main-nav">
<ul>
<li id="home" class="nav-links"><a href="#"><span></span>Main Level Link</a></li>
<li id="home" class="nav-links"><a href="#"><span></span>Main Level Link</a></li>
<li id="home" class="nav-links"><a href="#"><span></span>Main Level Link</a></li>
<li id="home" class="nav-links"><a href="#"><span></span>Main Level Link</a></li>
</ul>
</div>
<div class="main-subnav">
<div class="container">
<div class="sub-menu">
<h2>Some title here</h2>
<div class="sub-container">
<ul class="grid_3 alpha">
<li><a href="#">Sub level link</a></li>
<li><a href="#">Sub level link</a></li>
<li><a href="#">Sub level link</a></li>
</ul>
<ul class="grid_3">
<li><a href="#">Sub level link</a></li>
<li><a href="#">Sub level link</a></li>
<li><a href="#">Sub level link</a></li>
</ul>
<ul class="grid_3 omega">
<li><a href="#">Sub level link</a></li>
<li><a href="#">Sub level link</a></li>
<li><a href="#">Sub level link</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>