# Register Extra Menu Locations

> Adds new menu locations, such as a footer menu and a legal links menu, that you can assign under Appearance > Menus and print with wp_nav_menu() in a classic theme.

- Type: PHP
- Runs: Run everywhere
- Category: [Developer](https://wpide.com/library/category/developer/)
- Tags: menus, themes, navigation, classic-themes
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/dev-register-menu-locations/

## Code

```php
add_action( 'after_setup_theme', function () {
    register_nav_menus( array(
        'wpide-footer' => 'Footer menu',
        'wpide-legal'  => 'Legal links',
    ) );
}, 20 );
```

## Notes

Print a location in a template with wp_nav_menu( array( 'theme_location' => 'wpide-footer' ) );. Block themes use the Navigation block instead.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Register Extra Menu Locations" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
