Title: Register Nav Menus
Last modified: August 21, 2016

---

# Register Nav Menus

 *  [thrasherstudios77](https://wordpress.org/support/users/thrasherstudios77/)
 * (@thrasherstudios77)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/register-nav-menus/)
 * Hi
 * I am experiencing a strange error when trying to update the name of a registered
   menu location in functions.php
 * This error only shows up when in debug mode: define(‘WP_DEBUG’, true);
 * So originally the name of the menu location was **primary**
 *     ```
       register_nav_menus( array(
       	'topbar_info' => __( 'Top Header Menu (Info)', '' ),
       	'topbar_controls' => __( 'Top Header Menu (Controls)', '' ),
       	'primary' => __( 'Main Menu', '' )
       	) );
       ```
   
 * If I change the name from ‘primary’ to ‘menu-style1’
 *     ```
       register_nav_menus( array(
       	'topbar_info' => __( 'Top Header Menu (Info)', '' ),
       	'topbar_controls' => __( 'Top Header Menu (Controls)', '' ),
       	'menu-style1' => __( 'Main Menu', '' )
       	) );
       ```
   
 * I get this error on the backend: Appeararance/Menus/Edit Menus:
 *     ```
       Main Navigation( ! ) Notice: Undefined index: primary in C:\wamp\www\frank\wp-admin\nav-menus.php on line 627
       Call Stack #TimeMemoryFunctionLocation 10.00271127856{main}(  )..\nav-menus.php:0 (, Main Menu)
       ```
   
 * If I turn debug off I don’t see the error. Not sure what I am doing wrong here
   any help is appreciated.
 * thanks

The topic ‘Register Nav Menus’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [thrasherstudios77](https://wordpress.org/support/users/thrasherstudios77/)
 * Last activity: [12 years, 6 months ago](https://wordpress.org/support/topic/register-nav-menus/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
