I want to restrict wordpress admin to view all users in user list.
For say, I have created custom roles (company users, employee). A company user type role can have multiple employees.
I want wordpress admin to only view company users.
function prepare_items() inside
WP_Users_List_Table class can filter this. So have tried to override this in my theme’s functions.php.
But it’s not working. How and where I can override this functionality without touching core wordpress methods?
This I want in admin UI.
Thanks in advance.
Read more here: Change the functionality of wordpress users module in admin