Sort new column in Users wp-admin

If orderby equals post_count, WordPress will always work with posts from the default post type post. What you can do is, try to modify that part of the query for this specific case. Something like this should work: add_filter( ‘query’, ‘smartwp_sort_last_login_column_query’ ); function smartwp_sort_last_login_column_query( $query ) { if ( ! is_admin() ) { return $query; … Read more