WordPress.org

Support

Support » How-To and Troubleshooting » Hide sub menu on specific usernames

Hide sub menu on specific usernames

  • I’m using the following code:

    function delete_submenu_items() {
    	if ( current_user_can( 'editor' )) {
    		remove_submenu_page( 'themes.php', 'theme-editor.php');
    	}
    }
    add_action( 'admin_init', 'delete_submenu_items' );

    But instead of having it on ‘editor’ role how do i make it work only on specific username i created?

  • The topic ‘Hide sub menu on specific usernames’ is closed to new replies.