1 回答

TA貢獻(xiàn)1878條經(jīng)驗(yàn) 獲得超4個(gè)贊
你有沒有嘗試過:
$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 關(guān)注
- 158 瀏覽
添加回答
舉報(bào)