The Admin Menu Hide function allows you to hide specific admin menu items from the WordPress admin panel. This is useful for simplifying the admin interface for clients or restricting access to sensitive configuration areas.
Overview
This function targets Voxel-specific admin menu items that you may want to hide from certain users or simplify the admin experience. Currently supports hiding the Structure (Post Types) and Membership configuration pages.
Navigate to Voxel Toolkit > Functions in your WordPress admin
Find Admin Menu Hide in the list of available functions
Toggle the switch to enable the function
Click Save Changes
Step 2: Select Menus to Hide
After enabling the function, you can select which menus to hide:
Menu Option
Description
URL Hidden
Structure (Post Types)
Hides the Voxel Post Types configuration page
admin.php?page=voxel-post-types
Membership
Hides the Voxel Membership configuration page
admin.php?page=voxel-membership
Use Cases
Client Sites
When building sites for clients, you may want to hide complex configuration areas to prevent accidental changes to the site structure.
Simplified Admin Experience
For sites with multiple administrators, hiding menus they don’t need access to creates a cleaner, more focused admin interface.
Agency Management
Agencies can hide structural configuration menus on client sites while maintaining access through other means if needed.
How It Works
The function uses multiple methods to ensure menus are hidden reliably:
Primary Method: Uses WordPress remove_menu_page() function
Submenu Cleanup: Removes from submenus if the menu is nested
Fallback Method: Hooks into admin_init for secondary removal
CSS Fallback: Adds CSS to hide any remaining menu elements
Note: Hiding a menu does not remove the underlying functionality. Users with direct URLs can still access the pages. For complete access control, use WordPress user role capabilities.
Troubleshooting
Menu Still Visible
Clear your browser cache and any caching plugins
Ensure the function is enabled in Voxel Toolkit > Functions
Check that the specific menu is selected to be hidden
Try logging out and back in to refresh admin menus
Need to Access Hidden Menu
If you need to access a hidden menu:
Disable the Admin Menu Hide function temporarily
Or access the page directly via URL (e.g., /wp-admin/admin.php?page=voxel-post-types)