我已经购买了一个HTML主题,我想将其重建到Wordpress中。我很难把菜单弄好。
下面是菜单的HTML。(无UL的开头和结尾)。
<li class="menu-level-0"><a href="portfolio-cols3.html"><i class="icon-menu icon-menu1"></i><span>Portfolio</span></a>
<ul class="submenu-1">
<li class="menu-level-1"><a href="portfolio-cols3.html"><span>Three Columns</span></a></li>
<li class="menu-level-1"><a href="portfolio-cols4.html"><span>Four Columns</span></a></li>
</ul>
</li>
<li class="menu-level-0 current-menu-item"><a href="#"><i class="icon-menu icon-menu2"></i><span>Pages</span></a>
<ul class="submenu-1">
<li class="menu-level-1"><a href="about-us.html"><span>About Page</span></a></li>
<li class="menu-level-1"><a href="pricing.html"><span>Pricing Page</span></a></li>
<li class="menu-level-1 current-menu-item parent"><a href="index.html"><span>Home Pages</span></a>
<ul class="submenu-2">
<li class="menu-level-2 current-menu-item"><a href="index.html"><span>Gallery images</span></a></li>
<li class="menu-level-2"><a href="index-2.html"><span>OneByOne Slider</span></a></li>
<li class="menu-level-2"><a href="index-3.html"><span>Video in header</span></a></li>
<li class="menu-level-2"><a href="index-4.html"><span>Image & Video Slider</span></a></li>
</ul>
</li>
<li class="menu-level-1 parent"><a href="services-2.html"><span>Services Page</span></a>
<ul class="submenu-2">
<li class="menu-level-2"><a href="services-2.html"><span>Services Page (var1)</span></a></li>
<li class="menu-level-2"><a href="services.html"><span>Services Page (var2)</span></a></li>
</ul>
</li>
<li class="menu-level-1"><a href="blog.html"><span>Sidebar Right</span></a></li>
<li class="menu-level-1"><a href="blog-sidebar-left.html"><span>Sidebar Left</span></a></li>
<li class="menu-level-1 parent"><a href="#"><span>Shortcodes</span></a>
<ul class="submenu-2">
<li class="menu-level-2"><a href="shortcodes-buttons.html"><span>Buttons & Lists</span></a></li>
<li class="menu-level-2"><a href="shortcodes-text.html"><span>Text & Images</span></a></li>
<li class="menu-level-2"><a href="shortcodes-charts.html"><span>Charts</span></a></li>
<li class="menu-level-2"><a href="shortcodes-columns.html"><span>Columns</span></a></li>
<li class="menu-level-2"><a href="shortcodes-columns-full.html"><span>Columns full width</span></a></li>
<li class="menu-level-2"><a href="shortcodes-lightbox.html"><span>Lightbox</span></a></li>
<li class="menu-level-2"><a href="shortcodes-media.html"><span>Videos & Galleries</span></a></li>
<li class="menu-level-2"><a href="shortcodes-maps.html"><span>Google Maps</span></a></li>
<li class="menu-level-2"><a href="shortcodes-tabs.html"><span>Tabs & Toggles</span></a></li>
<li class="menu-level-2"><a href="shortcodes-tables.html"><span>Boxes & Tables</span></a></li>
<li class="menu-level-2"><a href="shortcodes-typography.html"><span>Typography</span></a></li>
<li class="menu-level-2"><a href="shortcodes-widgets.html"><span>Custom Widgets</span></a></li>
</ul>
</li>
</ul>
</li>
<li class="menu-level-0"><a href="blog.html"><i class="icon-menu icon-menu3"></i><span>Blog</span></a></li>
<li class="menu-level-0"><a href="contact.html"><i class="icon-menu icon-menu4"></i><span>Contact</span></a></li>
我需要获取返回的HTML
wp_nav_menu()
查看上面的代码,以便在模板中以正确的方式获取菜单。
我应该怎么做?