Query Users by post count, last 30 days and display each users post count according to post type
I'm almost done, the code below does everything but display post count for each user broken down into post types, and also I'm like to filter it last thirty days.
I'm trying to get the post for each user fr the custom post type 'music'.
div id="top-artist-wrapper"
?php foreach ( get_users('orderby=post_countnumber=5') as $user ) : ?
div class="top-artists"
?php echo get_avatar($user-ID, '64'); ?
div class="artist-name"
?php echo $user-display_name; ? (?php echo count_user_posts( $user-ID, $post_type='music' ); ? Posts)
/div
/div
?php endforeach; ?
/div
What am I missing, is the even the right way to do the query?
Pardon the HTML mixed in.
Topic wp-user-query wp-query users Wordpress
Category Web