Title: wp_nav_menu() not customizing output.
Last modified: August 21, 2016

---

# wp_nav_menu() not customizing output.

 *  Resolved [SooperGenius](https://wordpress.org/support/users/soopergenius/)
 * (@soopergenius)
 * [12 years ago](https://wordpress.org/support/topic/wp_nav_menu-not-customizing-output/)
 * Hi. I’m trying to put a fairly standard navigation menu in the header part of
   my site. I’ve put the following code in the functions.php file of the theme…
 *     ```
       add_theme_support("nav-menus");
       function custom_navigation_menus() {
           $locations = array(
               'header-menu' => __( 'Main Navigation', 'text_domain' ),
           );
           register_nav_menus( $locations );
       }
       add_action("init", "custom_navigation_menus");
       ```
   
 * And I put this code in my header.php file…
 *     ```
       <?php wp_nav_menu(
           array(
               "theme-location"	=> "header-menu",
               "container" 		=> "div",
               "container_class" 	=> "standard-font",
               "container_id" 		=> "header-menu",
               "items_wrap" 		=> "<ul>%3$s</ul>",
               "after" 			=> " | "
           )
       ); ?>
       ```
   
 * The menu is showing up just fine but without the customized container_class, 
   container_id, etc. It’s spitting out the standard mark-up. Before anyone mentions
   it, I know I could simply apply CSS to the standard mark-up but I’d like to know
   what I’m doing wrong here for my own enlightenment.

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

 *  [Yojance Rabelo](https://wordpress.org/support/users/yojance/)
 * (@yojance)
 * [12 years ago](https://wordpress.org/support/topic/wp_nav_menu-not-customizing-output/#post-4770989)
 * `"theme_location" => "header-menu",`
    Notice that I changed – with an underscore
   on theme location so it reads _theme\_location_.
 *  Moderator [Jose Castaneda](https://wordpress.org/support/users/jcastaneda/)
 * (@jcastaneda)
 * THEME COFFEE MONKEY
 * [12 years ago](https://wordpress.org/support/topic/wp_nav_menu-not-customizing-output/#post-4770991)
 * Are you using the correct theme location? It should be `theme_location` and not`
   theme-location`. That is what I’m guessing just by looking at the code.
 *  Thread Starter [SooperGenius](https://wordpress.org/support/users/soopergenius/)
 * (@soopergenius)
 * [12 years ago](https://wordpress.org/support/topic/wp_nav_menu-not-customizing-output/#post-4770994)
 * Thanks, guys. You are correct that I had mistyped the “theme_location”. However,
   correcting that problem doesn’t actually fix the issue. It still doesn’t add 
   the “id” or “class” to the container or anything else. If someone wants, I can
   put the zip file with the theme somewhere. I’m perfectly willing to let folks
   look at my code. I just didn’t want to clutter the forum with crap-tons of code.
 * Andrew
 *  [Jam Viet](https://wordpress.org/support/users/mcjambi/)
 * (@mcjambi)
 * [12 years ago](https://wordpress.org/support/topic/wp_nav_menu-not-customizing-output/#post-4770997)
 * Sometime i have the same mistyping like dash and underscore.
 *  Moderator [Jose Castaneda](https://wordpress.org/support/users/jcastaneda/)
 * (@jcastaneda)
 * THEME COFFEE MONKEY
 * [12 years ago](https://wordpress.org/support/topic/wp_nav_menu-not-customizing-output/#post-4770998)
 * You can also use [gist.github.com](https://gist.github.com/) if you want.
 *  Thread Starter [SooperGenius](https://wordpress.org/support/users/soopergenius/)
 * (@soopergenius)
 * [12 years ago](https://wordpress.org/support/topic/wp_nav_menu-not-customizing-output/#post-4771053)
 * Gist is quite cool. I’ve put the relevant code in there, I think. If you need
   something else put in, let me know.
 * [https://gist.github.com/AndrewECooper/9970622](https://gist.github.com/AndrewECooper/9970622)
 * Andrew
 *  Moderator [Jose Castaneda](https://wordpress.org/support/users/jcastaneda/)
 * (@jcastaneda)
 * THEME COFFEE MONKEY
 * [12 years ago](https://wordpress.org/support/topic/wp_nav_menu-not-customizing-output/#post-4771075)
 * It’s the `items_wrap` that is causing that. You haven’t declared the `id` or 
   the `class` in the `ul`. I’m surprised I [missed that](http://codex.wordpress.org/Function_Reference/wp_nav_menu).
   Lol.
 * and I also commented in your gist. 😉
 *  Thread Starter [SooperGenius](https://wordpress.org/support/users/soopergenius/)
 * (@soopergenius)
 * [12 years ago](https://wordpress.org/support/topic/wp_nav_menu-not-customizing-output/#post-4771086)
 * Thanks for the help guys!
 *  Moderator [Jose Castaneda](https://wordpress.org/support/users/jcastaneda/)
 * (@jcastaneda)
 * THEME COFFEE MONKEY
 * [12 years ago](https://wordpress.org/support/topic/wp_nav_menu-not-customizing-output/#post-4771088)
 * Of course! Happy to help however we can. 🙂

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

The topic ‘wp_nav_menu() not customizing output.’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 9 replies
 * 4 participants
 * Last reply from: [Jose Castaneda](https://wordpress.org/support/users/jcastaneda/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/wp_nav_menu-not-customizing-output/#post-4771088)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
