Home / Admin / Simple Admin Menu
Duplicate Snippet

Embed Snippet on Your Site

Simple Admin Menu

Organize the admin menu by visually hiding excessive items while retaining all functions intact under the hood.

Code Preview
php
<?php
// Simple Admin Menu / Kiri Vadivelu / 2026
add_action( 'admin_menu', 'simple_admin_menu' );
// Visually hide but retain all functions intact
function simple_admin_menu() {
    $current_user_id = get_current_user_id();
    // Only apply if the user is NOT User ID 1
    if ( $current_user_id != 1 ) {
        // Remove Appearance menu (themes.php)
        remove_menu_page( 'themes.php' );
        // Remove Theme/ Plugin editor (tools.php)
        remove_menu_page( 'tools.php' );
        // Remove Settings menu (options-general.php)
        remove_menu_page( 'options-general.php' );
    }
}    

Comments

Add a Comment