Voxel Toolkit 1.6.1 is Available!

Admin Menu Hide

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.

Key Features

  • Hide Voxel Structure (Post Types) menu
  • Hide Voxel Membership menu
  • Multiple fallback methods ensure menus stay hidden
  • CSS fallback for complete invisibility
  • Easy toggle configuration

Setup Instructions

Step 1: Enable the Function

  1. Navigate to Voxel Toolkit > Functions in your WordPress admin
  2. Find Admin Menu Hide in the list of available functions
  3. Toggle the switch to enable the function
  4. Click Save Changes

Step 2: Select Menus to Hide

After enabling the function, you can select which menus to hide:

Menu OptionDescriptionURL Hidden
Structure (Post Types)Hides the Voxel Post Types configuration pageadmin.php?page=voxel-post-types
MembershipHides the Voxel Membership configuration pageadmin.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:

  1. Primary Method: Uses WordPress remove_menu_page() function
  2. Submenu Cleanup: Removes from submenus if the menu is nested
  3. Fallback Method: Hooks into admin_init for secondary removal
  4. 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)
AI Assistant