I believe that you can achieve this effect by grouping the query by author ID, which will require a filter(mostly cribbed from the Codex):
function my_posts_groupby($groupby) {
global $wpdb;
$groupby = "{$wpdb->posts}.post_author";
return $groupby;
}
add_filter( 'posts_groupby', 'my_posts_groupby' );
If you have less than 8 authors, however, this won’t work. (You will get a number of results equal to your number of authors.) If that is the case you will need much more complicated logic and a much more complicated code.
Related Posts:
- Counting instances of words in the results of a post query
- date_query problem
- Too slow when using both ‘tax_query’ and ‘meta_query’ both in WP_Query
- How can I save an array from a random post sequence for later use?
- author.php with ACF and CPTs
- Query to return maximum of one post per author
- Show only oldest post by author
- assign 2 $args to one wp_query
- Add inline HTML to posts published within last 24hrs
- Function to check if author has posted within the last x days
- Use Transient API to cache queries for all posts in all categories?
- meta_query not working properly
- WP Meta Query for some meta (array) values
- meta_query with array as value
- How to target the default Recent Posts and Recent Comments widgets with pre_get_posts?
- Pagination 404 errors for author posts query on author.php
- How add a custom posttype name using ACF field to a query post array
- Get List of all the Authors
- How can I pick a single post from the latest 3?
- WP Query for variable taxonomies
- Minimize database queries to user tables?
- (Solved) WP_Query ($ args) -> How to sort letters and numbers within the same array
- Adding an array from a query string to a WP meta_query
- How can I display list of all posts from a specific author, with publish dates in the future, on an author archive page (author.php)?
- Get authors by term id or slug
- Weird orderby => post__in issue
- How to list custom fields as headers and list all pages sharing that custom field under it?
- Dynamic User Id
- Custom Query by Author field and meta
- slow WP_Query for non-admin user
- WP_Query (list) posts according to author’s custom field
- Query all posts if multiple meta key don’t exist
- WP_Query with offset and ‘orderby’ => ‘rand’, offset not working
- Get posts by list of post IDs ordered by those IDs?
- Exclude some authors from query
- Get author if post has multiple authors
- Reset WordPress Post Query to default
- Removing duplicate values between two wordpress queries
- Include current post into loop
- All posts returned when author of 0 is queried
- Combine results of multiple WP_Query to resemble single WP_Query
- How do I turn these values from MYSQL into an array
- Posts in loop all show the same author when there are many authors
- Does meta_value (array) work with ‘orderby’?
- search serialised meta_value for date value?
- Stomping WP_Query in author archive to facilitate pagination with custom queries
- Display if author page is author page of current user
- Combine 2 arrays in a query parameter
- 2 column recent post query not respecting float right [closed]
- Exclude authors IDs from WP_Query
- WP_Query author parameter not working
- How can I comment comma-separated array values?
- How do I add a relation parameter to my filter query?
- construct complex queries with WP User Query
- query post by author gender
- Get a list of ACF Repeater-Fields as array
- WP_Query with page_ids in arguments without a result
- Display recent posts on another site
- Query using string from custom field as array value
- Multiple meta query from array
- Category based on post id
- How to get specific string in explode array?
- How to avoid filling up an array each time I run a WP_query?
- How can i show pagenavi in my author.php?
- Remove from array in WP_Query loop
- How to add a recent post function to a text widget I created for practice?
- meta_query returning excluded result
- wp query to use both author id and meta_query
- Combine relationship posts with existing wp_query
- Query posts by post type, author and post meta
- sanitize_post() is not sanitizing Post Object
- Retrieve all custom field values of a specific custom field metakey as an array, inside WP_Query
- WP Query by 4 different taxonomies
- Trouble with serialized metadata
- Get authors list and sort them by recent posts
- What code to use in an array to call the current sub-category?
- WP_User_Query Orderby Not Working
- Loop through array of pages
- Repeat array inside array through while loop
- Sorting Posts by Taxonomy thats not within the query’s $args
- query all posts published by certain user id
- Related Post by Tags Code
- WP_Query: Meta_Query with serialized value (or a workaround)
- how to query for meta_value have array
- wp_query – Modify $query to include duplicate content
- Iterate through ID’s in loop
- How to get several fields from wp_query?
- How to sort a WP_Query array by post_name after an array_merge();
- Issue with WP_Query (need a array of selected ID’s)
- WordPress WP_Query Array Custom search via taxonomies
- WP Query posts__in not working with array
- WP Query get posts by specific author IDs if one of several logged in authors
- Sort Posts with custom meta key by default which is currently set as optional
- Dynamically name array in WordPress loop – add/get values
- Dynamically create array from page title
- WordPress Query Returning Every Post
- Creating Custom Query
- How do I have multiple metaqueries inside one wordpress query
- I want to place a post before all others from an ACF boleen field
- wp_query, calculate with two dates when ‘key’ is text format