Title: Problem with menu
Last modified: August 20, 2016

---

# Problem with menu

 *  Resolved [meisam](https://wordpress.org/support/users/meisam/)
 * (@meisam)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/problem-with-menu-8/)
 * I’m trying to generate a menu in my template using the following code:
 *     ```
       <?php
       wp_nav_menu(array(
           'theme_location' => 'main-menu',
           'container' => 'nav',
           'container_id' => 'menu',
           'menu_class' => 'navigation',
           'menu_id' => 'nav'
       ));
       ?>
       ```
   
 * What I should be ending up with is this:
 *     ```
       <nav id="menu">
           <ul class="navigation" id="nav">
       	<li><a href="http://localhost/sample-page/">Sample Page</a></li>
           </ul>
       </nav>
       ```
   
 * Instead I get this:
 *     ```
       <div class="navigation">
           <ul>
               <li class="page_item page-item-2"><a href="http://localhost/sample-page/">Sample Page</a></li>
           </ul>
       </div>
       ```
   
 * Am I doing something wrong?

Viewing 1 replies (of 1 total)

 *  Thread Starter [meisam](https://wordpress.org/support/users/meisam/)
 * (@meisam)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/problem-with-menu-8/#post-3116060)
 * Please ignore this message I didn’t know that the default generated menu does
   not follow the arguments passed.

Viewing 1 replies (of 1 total)

The topic ‘Problem with menu’ is closed to new replies.

## Tags

 * [css](https://wordpress.org/support/topic-tag/css/)
 * [id](https://wordpress.org/support/topic-tag/id/)
 * [menu](https://wordpress.org/support/topic-tag/menu/)
 * [navigation](https://wordpress.org/support/topic-tag/navigation/)

 * 1 reply
 * 1 participant
 * Last reply from: [meisam](https://wordpress.org/support/users/meisam/)
 * Last activity: [13 years, 7 months ago](https://wordpress.org/support/topic/problem-with-menu-8/#post-3116060)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
