Query arguments to get posts with multiple authors

[ad_1]

Hi, I am trying to modify a WordPress query to return posts where a given user is among the authors.

I would expect it to work with:

$args = array(
'author__in' => $authors,
);

That works fine for posts with only one author, but if multiple authors is assigned to a post, it only returns those where the author is mentioned first (in the list of multiple authors of the post).

Please advice how to modify the query to get all posts where a given author is assigned.

Thank you.

The page I need help with: [log in to see the link]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer