问题描述:

I'm using the http://responsive-nav.com/ system in my wordpress theme but I have some bugs with the responsive menu.

With this html code it works (without wordpress menu):

 <nav class="nav-collapse">

<ul>

<li><a href="#">Home</a></li>

<li><a href="#">About</a></li>

<li><a href="#">Projects</a></li>

<li><a href="#">Contact</a></li>

</ul>

</nav>

But with the wordpress menu it doesn't:

 <nav class="nav-collapse">

<?php wp_nav_menu( array('menu' => 'Main' )); ?>

</nav>

Do you have an idea?

Thanks in advance

网友答案:

I found the solution, I replace:

    <nav class="nav-collapse">
      <?php wp_nav_menu( array('menu' => 'Main' )); ?>
    </nav>

by:

    <nav>
      <?php wp_nav_menu( array('menu' => 'Main','container_class' => 'nav-collapse' )); ?>
    </nav>

and it works like that.

相关阅读:
Top