Skip to content
Merlin Tools

Nav menus generator

register_nav_menus from the locations you list.

Genuinely free. No sign-up, no email, no limits, no cookies. We don't store the URL you analyse.

Code
<?php
add_action( 'after_setup_theme', function () {
	register_nav_menus( array(
		'primary' => 'Primary menu',
		'footer' => 'Footer menu',
	) );
} );

What it's for

For a menu to appear among the assignable locations in the admin, the theme must register it. List the locations you need and get the correct register_nav_menus function.

← All WordPress tools

Frequently asked questions

How do I then show the menu in the theme?

With wp_nav_menu( array( 'theme_location' => 'slug' ) ) at the point in the template where you want the menu, using the slug you registered here.