Add ‘Navigation Menus’ to WordPress Admin Appearance Menu

Add navigation menus to wordpress admin appearance menu image

Pining for the good ol’ days? I don’t know why. The future rules. But you can add the Menus menu item back to WP admin, if it makes you feel better. Not much you can do with it other than rename and delete. But you can do those things, if it makes you feel better.

What it does…

Adds a new submenu item called ‘Navigation Menus’ to your WordPress Admin under the ‘Appearance’ menu.

Why it does it…

Now if you want to rename or delete Nav Menus that you’ve created in the Block Editor, you can.

How it does it…

Uses `add_submenu_page` to link to `edit.php?post_type=wp_navigation`

See the code…

<?php

// Add 'Navigation Menus' to WordPress Admin Appearance Menu
// Allows you to easily rename or delete menus that show in the block editor (but you can't really edit them otherwise).
// https://snipsnip.pro/s/161
namespace AneOrk;
// from: https://developer.wordpress.org/reference/hooks/admin_menu/#comment-4196
// from: https://developer.wordpress.org/reference/functions/add_submenu_page/#comment-4324
function add_manage_menus() {
	\add_submenu_page( 'themes.php', 'Navigation Menus', 'Navigation Menus', 'manage_options', 'edit.php?post_type=wp_navigation' );
}
\add_action('admin_menu', '\AneOrk\add_manage_menus');

Leave a Reply

Your email address will not be published. Required fields are marked *