How to show authors by level of users and number of posts?
-
Well, hello!
I was wondering how can I make a query that shows me for examples editor or authors info just when we have an X number of posts (for example 3 post). The idea is to show for example in the authors page all authors that have more than 3 posts as part of the staff.
$authors = $wpdb->get_results('SELECT DISTINCT post_author FROM '.$wpdb->posts.' INNER JOIN '.$wpdb->users.' ON '.$wpdb->posts.'.post_author = '.$wpdb->users.'.ID ORDER BY '.$wpdb->users.'.display_name ASC');
What I have is this, but this only shows users with posts..
How can I add the type of users to this?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘How to show authors by level of users and number of posts?’ is closed to new replies.