get author ids instead of author nicename to get posts for muliiple authors using WP_Query();
$author_list = array();
foreach((array)$authors_list as $author) $author_list[] = $author->ID;
// make comma separated string from author ids array
$author_list = implode(',', $author_list)
and change wp query args
$author_posts_args = array(
'author' => $author_list,
'post_type' => 'post',
'cat' => $colecti_id,
'posts_per_page' => '4',
);
$author_posts_query = new WP_Query($author_posts_args);
Related Posts:
- Getting all user metadata from user
- How to add custom query filters in WP_User_Query
- Filter user list that meta_value is empty
- Query wp_usermeta alongside wp_users
- SQL User Query by Multiple Roles using PHP
- WP User Query get all authors with last name starting with specific letter
- Sort users by “birthday” using WP_User_Query
- Hide Administrators From User List except current user (administrator)
- How to display user order by role
- Import wp users via one click demo option
- Dynamic User Id
- Prevent author bio page from showing in search results
- Get multiple users with meta value in one query and populate WP_User class
- Reduce number of SQL queries inside WP_Query loop to fetch author data
- Display if author page is author page of current user
- Get user first name from custom endpoint
- Storing an array of objects related to each user
- Create one-use post dynamically, add to main query, do not insert post (user profile view)
- Query pages created by deleted users
- Query posts by post type, author and post meta
- Random users always showing same 8 users
- Set “editor” role to existing user
- How to query 5 users in random who have published more than 10 posts
- How to query users by post count no less than 10
- Merge wp-query and get_users
- Get all wp_users sort by metakey
- Logging search queries for logged-in users
- List users by Year of Birth using a foreach loop to dynamically populate years and data
- Show subscriber id in loop
- Query Users by post count, last 30 days and display each users post count according to post type
- Get users query makes the site loading time too big?
- Get all user with both meta_value
- WP Query Args – Title or Meta Value
- Order Search Results Page by meta_value If no Value Return Remaining Results
- Query all posts where meta value is empty
- How to get post meta value and post in one query?
- Revolution Slider Orderby Two Custom Fields
- wp query by search in titles only & put the posts in loop
- Get random terms
- Woocommerce custom loop to show all the products [closed]
- Count posts returned by get_posts in external PHP script
- Pagination 404 errors for author posts query on author.php
- List the 5 most recent child pages
- Meta-value query
- Adding multiple post queries with parent and children to page – Best Way
- Complex Orderby Parameters: How to query with multiple orderby parameters using meta_value_num?
- How is WP_Query parsed to determine which template to request?
- new WP_Query(), have_posts() return false in user_register hook
- How to filter, restrict and return posts based on custom user meta information
- Masonry, WP_Query & paged – first page repeating, second page not loading
- Query posts intersecting tags and categories
- REST API: Limit Read Permissions for Default Endpoints
- How to sort post by custom table value
- Pagination on static Posts page
- Include current post into loop
- Is it safe to access the underlying mysqli object from \wpdb for custom queries?
- wp_query to print posts if have X custom field value
- Rewrite gets completely ignored
- Check for the main query from the template
- get_posts() and global variables
- Should $query-> be used with conditional tags?
- Get user posts with custom WP_Query on author.php
- How to combine two WP_Query objects?
- WP_Query author parameter not working
- How to order posts on each different category?
- Getting the post terms ‘wp_get_post_terms’ per post when within the functions.php file
- Loop 3 posts column wise and continue the loop into same columns
- Is it possible to retrieve posts depending on meta_key LIKE condition? [duplicate]
- WP Query and date format
- How to Order By Two Custom Fields?
- function wp() does not use meta_query?
- Query Not working as expected
- How to create single page site in WordPress
- Custom template for password protected page
- WP_Query Class custom field parameters
- How to get all user posts from two post types in wp_query
- WP_Query for distinct meta values
- Group Product Types
- pre_get_posts pagination not working
- Prevent Duplicate Post Counted by Query
- Save queried result into database
- WP Query by variable custom field
- WP_Query multiple value not working
- Move some posts to end of sort order, even if there is a sort in the wp_Query already
- Translating WP query into to SQL query
- TAG Query showing only 1 result
- Tax_Query not working – connecting to second wordpress database
- How to search CPTs in draft using get_page_by_title()
- WP Query Meta Query
- How can I modify standard search query to include also ACF custom fields values?
- Empty ‘terms’ in ‘tax_query’ returns an empty array
- Archive – Show Page Month Headers
- More efficient query to display posts in same sub-category?
- Return a single custom post from multiple meta queries
- query post based on comparison
- Dynamically create array from page title
- Ordering Custom WP_Query loop by meta key value with pagination
- wp_pagenavi on WP_Query using customfields
- paginate_links() on page (shortcode output)
- How to write a query-function as a query-shortcode?