Not getting author rank when using return
You need a custom query – this will join the posts, postmeta and usermeta table together and then count all communityposts, post and video views, grouped by author: function wpse_190303_get_popular_users( $number = 5 ) { if ( ! $number = absint( $number ) ) return; global $wpdb; $query = ” SELECT SUM( $wpdb->postmeta.meta_value+0 ) AS … Read more