1 回答

TA貢獻1878條經驗 獲得超4個贊
你有沒有嘗試過:
$args = array(
'post_type' => 'product',
'posts_per_page' => 12,
'tax_query' => array(
array(
'taxonomy' => 'product_visibility',
'field' => 'name',
'terms' => 'featured',
),
// allow both hidden and not hidden featured items
array(
'relation' => 'OR',
array(
'taxonomy' => 'product_visibility',
'field' => 'name',
'terms' => 'hidden',
'operator' => 'NOT IN',
),
array(
'taxonomy' => 'product_visibility',
'field' => 'name',
'terms' => 'hidden',
'operator' => '=',
),
)
),
);
- 1 回答
- 0 關注
- 161 瀏覽
添加回答
舉報