2016-04-11 58 views
-1

這是我的代碼,我只是想在我的文字按下菜單中使用它。 我正在使用。但使用此我只得到父菜單不是孩子。 如果可能與沃克菜單然後請幫助我。 我使用這個代碼在前端GET菜單我想從零開始創建WordPress菜單

PHP:

wp_nav_menu(
    array(
     'theme_location' => 'primary', 
     'container_class' => 'main-navigation' 
    ) 
); 

HTML:

<div class="main-navigation"> 
    <ul> 
     <li> 
      <a href="index.html">Home</a> 
     <li> 
      <a class="btn dropdown-toggle" data-toggle="dropdown" href="#"> 
       About Us 
       <span class="caret"></span> 
      </a> 
      <ul class="dropdown-menu"> 
       <li><a href="who-we-are.html">Who are we</a></li> 
       <li><a href="core-value.html">Our Core Values</a></li> 
       <li><a href="management-team.html">Management Team</a></li> 
       <li><a href="customer-partner.html">Clients &amp; Partners</a></li> 
      </ul> 
      <ul class="about-us-img"></ul> 
     </li> 
     <li> 
      <a class="btn dropdown-toggle" data-toggle="dropdown" href="#"> 
       Service Offering 
       <span class="caret"></span> 
      </a> 
      <ul class="service-offer dropdown-menu"> 
       <li> 
        <i class="by-industry"></i><h3>By Industry</h3> 
        <ul> 
         <li><a href="manufacturing .html">Manufacturing</a></li> 
         <li><a href="healthcare .html">Healthcare</a></li> 
         <li><a href="retail.html">Retail</a></li> 
         <li><a href="consumer-durables.html">Consumer Durables</a></li> 
         <li><a href="logistics.html">Logistics</a></li> 
         <li><a href="ites-bpo-kpo.html">ITES (BPO/KPO)</a></li> 
         <li><a href="ecommerce .html">E-Commerce</a></li> 
        </ul> 
       </li> 
       <li><i class="by-function"></i><h3>By Function</h3> 
       <ul> 
       <li><a href="sales.html">Sales</a></li> 
       <li><a href="marketing.html">Marketing</a></li> 
       <li><a href="supply-chain.html">Supply Chain</a></li> 
       <li><a href="finance.html">Finance</a></li> 
       <li><a href="hr.html">HR</a></li> 
       </ul> 

       </li> 
       <li> 
        <i class="by-tech"></i><h3>By Technology</h3> 
        <ul> 
         <li><a href="qlikview.html">Qlikview</a></li> 
         <li><a href="qliksense.html">QlikSense</a></li> 
         <li><a href="msbi.html">MSBI</a></li> 
         <li><a href="dot-net.html">.Net</a></li> 
         <li><a href="sharepoint.html">SharePoint</a></li> 
         <li><a href="middleware-api.html">Middleware/API</a></li> 
         <li><a href="mobile.html">Mobile</a></li> 
        </ul> 
       </li> 
       <li> 
        <i class="by-business"></i><h3>By Line of Business</h3> 
        <ul> 
         <li><a href="analytics.html">Analytics</a></li> 
         <li><a href="application-development.html">Application Development</a></li> 
        </ul> 
       </li> 
      </ul> 
     </li> 
     <li class="drop-resourse"> 
      <a class="btn dropdown-toggle" data-toggle="dropdown" href="#"> 
       Resources 
       <span class="caret"></span> 
      </a> 

      <ul class="resourse-menu"> 
       <li><a href="case-studies.html">Case Studies</a></li> 
       <li><a href="http://www.blog.polestarllp.com/">Blog</a></li> 
       <li><a href="press-release.html">Press Releases</a></li> 
       <li><a href="methodology.html">Methodology</a></li> 
      </ul> 
      <ul class="resourse-img"></ul> 
     </li> 
     <li class="drop-career"> 
      <a class="btn dropdown-toggle" data-toggle="dropdown" href="#"> 
       Career 
       <span class="caret"></span> 
      </a> 
      <ul class="career-menu"> 
       <li><a href="job-opening.html">Job Opening</a></li> 
       <li><a href="life-at-polestar.html">[email protected]</a></li> 
      </ul> 
      <ul class="career-img"></ul> 
     </li> 
     <li class="drop-conatct"> 
      <a href="contact-us.html"> 
       Contact Us 
      </a> 


     </li> 

    </ul> 
</div> 
+0

當您添加菜單項到從管理面板WordPress的,你可以看到右上角的「屏幕選項」標籤。點擊該標籤後,您只需選中「CSS類」選項。使用此設置,您將按照您的草稿菜單將類添加到菜單項中。 –

+1

感謝,這是真棒,這是一個鏈接,http://polestarllp.com/ –

+0

你可以設置你的菜單,如下所示: <?php wp_nav_menu(array('menu'=>'Nav 1')); ?>

image
<?php wp_nav_menu(array('menu'=>'Nav 2')); ?>
image
image
<?php wp_nav_menu(array('menu'=>'Nav 3')); ?>
image
<?php wp_nav_menu(array('menu'=>'Nav 4')); ?> –

回答