Tools

How to Remove Items from the WordPress Admin Menu with Code Snippets

Clean up your WordPress admin menu safely with this plugin

3 min read

If you run a small business and want to customize your website, the Code Snippets plugin will become your ally. A plugin is a small extension that adds functions to WordPress without touching the theme's code. This particular one allows you to run custom code safely and easily, and it's the most convenient way to clean up the admin menu (the panel where you manage the entire site).

The problem: unwanted items in the admin menu

Imagine you want to keep your website clean and efficient. But after installing several plugins and themes (the templates that give the site its appearance), the admin menu fills up with unnecessary items that make navigation difficult. This is a common issue affecting many WordPress website owners.

These items can be default WordPress menu entries or elements added by plugins and themes. If they pile up, they create confusion and slow down website management.

Steps to remove items from the admin menu

Fortunately, you can solve this with Code Snippets. The steps:

  1. Install and activate the Code Snippets plugin: install it from the WordPress repository and activate it.

  2. Access the Code Snippets dashboard: once activated, you'll see a new section called "Snippets" in the admin dashboard. Click on it to get started.

  3. Add a new snippet: click on "Add New". Give it a descriptive title that helps you identify its function.

  4. Enter the removal code: in the code field, paste the specific code that will remove the unwanted item from the menu. You'll need to find it based on the item you want to remove.

  5. Assign the snippet to your website: choose "Apply snippet to the site" and select where you want the code to run.

  6. Save and activate the snippet: save the changes and activate it. The unwanted item will disappear from the menu.

Practical example

Let's look at a specific case. Suppose you have a plugin installed that adds an unwanted entry to the menu:

  1. Install and activate Code Snippets if you haven't already.

  2. Go to the Code Snippets section in the admin dashboard.

  3. Click on "Add New" and assign a title, such as "Remove entry X from the menu".

  4. Find the specific code to remove that entry. It will vary depending on the item.

  5. Paste the code into the corresponding field.

  6. Assign the snippet to your website and save it.

  7. Activate it, and the entry will disappear from the admin menu.

As you can see, customizing the menu with Code Snippets is really simple.

Benefits of this customization

Customizing the admin menu with Code Snippets offers several benefits:

  • Improved efficiency: with a clean and organized menu, finding the functions and tools you need is faster.

  • Greater user satisfaction: if the website is used by several administrators, a more intuitive interface reduces errors and makes work easier.

  • Brand identity: a menu that reflects your business's identity and values creates visual cohesion everywhere.

Additional tips

Before customizing the menu, keep a few tips in mind:

  • Make backups of your website before making significant changes.

  • Research the code you want to use carefully to make sure it's reliable and safe.

  • Some menu items are critical for WordPress to function properly: only remove what's absolutely necessary.

  • Keep the website and plugins updated to ensure compatibility and security.

If you also want to reduce dashboard clutter, in Adminimize: customize the WordPress dashboard I explain another way to do it without touching code.