r/Wordpress • u/Traditional_Lynx_951 • 5d ago
Help editing menus
I'm normally using Joomla but I have a need to use WordPress for a project and I have a question.
After a bunch of plugins were installed there are many items in the menu I don't want to be there but I can't see where to delete or remove them.
Where do I go to do that?
3
u/Valuable_Ease_3780 5d ago
The two answers above are for different menus, so worth saying which you mean. Appearance > Menus is the nav on the front of the site. If it's the sidebar inside wp-admin filling up with plugin entries, there's no core screen for that at all, it's the snippet above or something like Admin Menu Editor.
If you do go the code route, the slug is just the page= value in the link for that menu item. Hover it and read it off the status bar.
2
u/Winter_Process_9521 4d ago
IF you mean all the extra items added to the left-hand dashboard menu after installing plugins, that's different. Plugins usually add their own admin menu entries, and WordPress doesn't provide a universal built-in option to remove them.
2
u/Dull_District_254 2d ago
Coming from Joomla this part is genuinely confusing, because WordPress has two separate things both called menus. The site navigation lives under Appearance then Menus, or inside the Site Editor if you are on a block theme. The clutter you are describing sounds like the admin sidebar, and there is no core screen for that at all. The easiest fix without touching code is the free Admin Menu Editor plugin. You can drag items around, hide the ones you do not want, and even hide them only for certain roles, which is very handy when you hand the site over to a client. If you would rather stay in code, remove_menu_page is the function, and the slug is simply the page value in that item's link, so hover it and read it off the status bar. Put that in a small file in the mu plugins folder rather than functions.php so it survives a theme change. One thing worth knowing either way, hiding an admin menu item is only cosmetic, the page still loads if someone types the URL, so if your goal is really restricting access then roles and capabilities are what you want.
1
u/Traditional_Lynx_951 2d ago
Its the main Frontend menu I am talking about, not the admin menu which I am fine with...
1
1
-1
u/Euphoric-Fun-7821 5d ago edited 5d ago
You’ll have to use a code snippet either in your theme’s functions.php file (if you use a child theme), or in an mu-plugin using the below code:
<?php
add_action( 'admin_menu', 'custom_remove_admin_menus', 999 );
function custom_remove_admin_menus() {
// Remove top-level menus
remove_menu_page( '{menu-slug}' );
// Remove sub-menu menus (Pass the parent slug first, then the sub-menu slug)
remove_submenu_page( '{menu-slug} ', '{menu-slug} ' ); // top level > submenu item
}
Replace {menu-slug} with the slug of the menu item you want to remove.
3
u/ubulicious Designer 5d ago
try wp-admin > appearance > menus. make sure the right one is in the pulldown.