How to Hide and Show “Hide My WP” in the WordPress Menu
November 18, 2024
By default, Hide My WP Ghost is only visible in the WordPress menu for administrators. However, you can customize its visibility with a plugin like Roles & Capabilities. This guide will walk you through how to hide the plugin from all users and show it only to specific users.
Step 1: Install the Roles & Capabilities
- Log in to your WordPress admin dashboard.
- Navigate to Plugins > Add New.
- Search for “Roles & Capabilities” in the search bar.
- Click Install Now and then Activate.
Step 2: Grant a Specific User Access to Hide My WP Ghost
To allow only a specific user to view and manage Hide My WP Ghost, follow these steps:
1. Access Users > All Users
- Locate the user you want to grant access to and click on their name or hover and click Capabilities.
2. Update User Capabilities
- Once in the Capabilities Editor for the selected user, look for the capability hmwp_manage_settings.
- Check the box next to this capability to enable it for the user.
- Click Save to save the changes.
Step 3: Hide Menu from Administrator Roles
To ensure Hide My WP Ghost is hidden from all users:
- Go to Users > Roles section and Quick Edit the administrator role.
- Unselect hmwp_manage_settings capability from the administrator user
- Save the updates to apply the restrictions.
Step 4: Test the Changes
- Log in as the specific user you assigned the capability to.
- Verify that the Hide My WP menu appears in the dashboard.
- Log in as another user or use a different account to ensure the menu is hidden for them.
Notes:
- If you need to revert changes, simply check the hmwp_manage_settings capability for the user role administrator.
- Be cautious when granting access to capabilities, especially for sensitive plugins like Hide My WP, to maintain your website’s security.
By following these steps, you can ensure that only authorized users have access to configure Hide My WP Ghost, enhancing your site’s security and administrative control.