How to Remove Menus From the WordPress Dashboard
The WordPress codex is full of fun little things that you can experiment with. Have you ever wanted to remove a menu page from the WordPress dashboard? Perhaps you’re building a site for a client who gets confused by the settings menu. Blow the dust off of your handy codex and check out the function references for removing menu pages.
Here’s what you’re looking for:
Replace the menu slug with the name of the php script for the menu item you want to remove.
Here’s a quick example. Let’s say you want to remove the posts menu. Who needs to write posts?
Just for kicks, let’s remove the settings menu, too. Here’s the before and after:
The quick and dirty way to do this one is to add it to your theme’s functions.php file, but that’s only if you’re feeling like a lazy goose. The best way to add this type of modification is to create a functionality plugin. Don’t worry it’s very easy. Just open a blank text file and add a little information about your plugin and then your code:
Save this as remove-menu.php or whatever you want to name it. Then upload it to wp-content/plugins.
Last step: Don’t forget to activate your little plugin. You’ll find it among your inactive plugins, ready to activate:
That was easy, wasn’t it? Please be advised that this only removes the items from the menu but does not prevent a user from accessing those pages, should he know where they are located. For that you’d be better off using a more comprehensive option that limits users based on roles and capabilities.
Before turning to the plugin repository, you may want to have a little fun exploring the codex. You might find exactly what you need to create your own quick plugin.