WP Query get posts by specific author IDs if one of several logged in authors
If I’m understanding this correctly something along these lines should work. $authors = array( 1, 2, 3 ); // privileged users array $signed_in_user = wp_get_current_user(); // get current user // check if singed in user is in authors array if ( in_array( $signed_in_user->ID, $authors ) ) { $query = array( ‘posts_per_page’ = -1, ‘author__in’ = … Read more