Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

wordpress get posts by multiple authors

// Where the authors' ids are "1, 2, 3, 4", etc
get_posts([ 'author__in'=> [1, 2, 3, 4], 'post_type' => 'page', 'numberposts' => -1 ]);

// Original SO answer
query_posts( array( 'author__in'=> array_keys($following) , 'paged' => $paged, ) );
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #wordpress #posts #multiple #authors
ADD COMMENT
Topic
Name
1+7 =