Using meta_query with non-meta_query criteria in a WP_Query using OR instead of AND
You’re better off running two queries, then merging the results. $first = get_posts( [ ‘fields’ => ‘ids’, ‘s’ => $s, // … ] ); $second = get_posts( [ ‘fields’ => ‘ids’, ‘meta_query’ => … ] ); $ids = array_values( array_unique( array_merge( $first, $second ) ) ); $query_args = [ ‘post__in’ => $ids, // … ]; … Read more