I queried a list of users using WP_User_Query from which I got the avatar, name and a few ACF that I created for the user registration.
Now, I need to obtain a post list of each of the users in my results but I don't know how to do it.
This is my query WITHIN WP_User_Query:
$postArgs = array (
'author__in'=> array(2,4,6), //Authors's id's you like to include
'post_type' => 'post',
'posts_per_page' => 5,
);
$postsquery = new WP_Query ( $postArgs);
while ( $postsquery->have_posts() ) : $postsquery->the_post();
echo '
<li class="viral-note">
<div class="row no-gutter">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3"> <img src="' . get_the_post_thumbnail_url() . '" alt="" class="square-mini img-responsive"> </div>
<div class="col-xs-8 col-sm-8 col-md-8 col-lg-8">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12"> <span class="catego-tag">' . $category[0]->cat_name . '</span> </div>
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12"> <span class="excerpt">' . get_the_title() . '</span> </div>
</div>
</div>
</li>';
endwhile;wp_reset_query();
How can I store the users from my first query into an array and then pass it onto my second query?