Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter amadhavan

    (@amadhavan)

    I added this to my functions.php

    //hide theme and customize on admin bar and backend for anyone that is not an admin
    if ( !is_super_admin() ) {
    add_action( 'wp_before_admin_bar_render', 'admin_bar_hide' );
    add_action('admin_menu', 'customize_admin_menu_hide', 999);
    
    }
    function admin_bar_hide()
    {
        global $wp_admin_bar;
    
        $wp_admin_bar->remove_menu('customize');
    	$wp_admin_bar->remove_node( 'themes' );
    }
    
    function customize_admin_menu_hide(){
    
    global $submenu;
    // Appearance customize Menu
    unset($submenu['themes.php'][6]);	
    
    }

Viewing 1 replies (of 1 total)