The WordPress Admin console is more than just an area to create post, it is an area where you will be granting access to users who will have access to important features and settings depending on their permissions ( Subscriber, Contributor, Author, and Editor ). There are plenty of plugins available that allow you some control over user permissions but what if you have a plugin that for some strange reason still appears on the admin bar?
I am here to tell you that there is a simple way to hide plugins and custom post types from all users no matter what their permissions are. The easiest way is to edit the plugin directly, but there are additional coding methods you could use to allow the post type or plugin based on permissions. Today we will focus on simply removing the custom post type or plugin completely.
This tutorial is recommended for advanced users only. I also recommend trying these settings on a production site first.
Method 1. Remove Plugin and custom post type from Admin Side Bar Menu
- Log onto your WordPress Dashboard as a user with Admin privileges.
- Navigate to and click the Plugins link
- Locate the plugin you would like to remove from the dashboard and click the Edit link
- Perform a find and locate the following section: ‘show_ui’ => true,
- change it to –> ‘show_ui’ => false, ( this will remove it from the admin sidebar menu
- Click the [update file] button
- The plugin is still active but it should disappear from the admin side bar for all users
- The steps above also work for custom post type
The problem with most plugins is that some are actually custom post types while others depend on user permissions. I highly recommend using this WordPress plugin to mitigate removing access to plugins that are based on a users role . –> WordPress User Role editor