User sort by role administrator area

Add this code to functions.php of your current theme ( preferably, child theme ): function wpse_user_sortable_columns($columns) { $columns[‘role’] = ‘role’; return $columns; } add_filter(‘manage_users_sortable_columns’, ‘wpse_user_sortable_columns’); This will change Role column to be sortable.

custom user table columns

The filter is only applied to custom columns that are added by you (or plugins and themes), not the default columns. If you want to modify the output of all default columns, I think you may have to add your own columns and duplicate the functionality of the defaults, then unset the defaults via manage_users_columns, … Read more