Title: Theme Nav
Last modified: August 20, 2016

---

# Theme Nav

 *  [Danny159](https://wordpress.org/support/users/danny159/)
 * (@danny159)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/theme-nav/)
 * Hey guys,
 * I have the following HTML static code:
 *     ```
       <div class="Alignment">
           <div class="MenuItem First"><a href="?view=home" class="Selected">Link</a></div>
           <div class="MenuItem"><a href="?view=about" >Link</a></div>
           <div class="MenuItem"><a href="?view=gallery" >Link</a></div>
           <div class="MenuFooter"></div>
       </div>
       ```
   
 * And I want to turn this into a wordpress driven menu…
    I have the menu set-up
   but I cant get the settings right to do that I need too about?
 *     ```
       <?php
       wp_nav_menu(array(
       	'theme_location' => 'main',
       	'menu_class' => 'MenuItem'
       ));
       ?>
       ```
   
 * Can anyone please help me 🙂
    Dan

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [egado](https://wordpress.org/support/users/egado/)
 * (@egado)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/theme-nav/#post-2730541)
 * **1. Register the custom menu in your functions.php**
 *     ```
       // Custum Menus
       add_action('init', 'register_custom_menu');
   
       function register_custom_menu() {
       register_nav_menu('my-menu', 'My Menu');
       }
       ```
   
 * **2. Paste that (maybe with some little changes for the menu css class 😉 in 
   your template**
 *     ```
       <?php wp_nav_menu( array( 'theme_location' => 'my-menu', 'container' => 'my-menu', 'menu_class'  => 'my-menu-css-class' ) ); ?>
       ```
   
 * **3. Go to your admin area: Appearance > Menus and set up**
 * Does that work for you?
 *  Thread Starter [Danny159](https://wordpress.org/support/users/danny159/)
 * (@danny159)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/theme-nav/#post-2730544)
 * I have got it all working, I just need some help with the wp_nav_menu() function
   to get it to make the code I have above?
 * As what I have now is as following:
    `<?php wp_nav_menu( array( 'theme_location'
   => 'main', 'container' => 'Alignment', 'menu_class' => 'MenuItem' ) ); ?>`
 * But I get this from that…. not like the static code above….
 *     ```
       <div class="MenuItem">
           <ul>
               <li class="page_item page-item-10 current_page_item"><a href="#">Link</a></li>
               <li class="page_item page-item-20"><a href="#">Link</a></li>
               <li class="page_item page-item-18"><a href="#">Link</a></li>
               <li class="page_item page-item-22"><a href="#">Link</a></li>
           </ul>
       </div>
       ```
   
 * Dan
 *  [egado](https://wordpress.org/support/users/egado/)
 * (@egado)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/theme-nav/#post-2730547)
 * Oh ok… guess you wont get this 1:1 but have a closer look to the “items_wrap”
   option: [http://codex.wordpress.org/Function_Reference/wp_nav_menu](http://codex.wordpress.org/Function_Reference/wp_nav_menu)

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Theme Nav’ is closed to new replies.

 * 3 replies
 * 2 participants
 * Last reply from: [egado](https://wordpress.org/support/users/egado/)
 * Last activity: [14 years, 1 month ago](https://wordpress.org/support/topic/theme-nav/#post-2730547)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
