Параметры Таксономий
Получаем все записи с таксономией offer_cat, исключая записи с id 100, 101 и 102:
$q = new WP_Query([
'post_type' => 'offer',
'posts_per_page' => 99,
'tax_query' => [
[
'taxonomy' => 'offer_cat',
'field' => 'term_id',
'terms' => [100, 101, 102],
'operator' => 'NOT IN',
],
],
]);
Получаем записи (3) с таксономией offer_cat и id 100, 101 и 102:
$q = new WP_Query([
'post_type' => 'offer',
'posts_per_page' => 99,
'tax_query' => [
[
'taxonomy' => 'offer_cat',
'field' => 'term_id',
'terms' => [100, 101, 102],
'operator' => 'IN',
],
],
]);