woof_main_query_tax_relations
このフックを使用すると、WOOF 検索リクエスト内の任意のタクソノミーに対して論理「AND」を設定できます。
現在のWPテーマのfunctions.phpファイルで使用してください:
add_filter('woof_main_query_tax_relations', 'my_woof_main_query_tax_relations');
function my_woof_main_query_tax_relations()
{
return array(
'product_cat' => 'AND'
);
}
上記の例では、商品カテゴリーに論理「AND」を適用する方法を示しています。同様に、複数のタクソノミーに対して同時に実現することも可能です:
add_filter('woof_main_query_tax_relations', 'my_woof_main_query_tax_relations');
function my_woof_main_query_tax_relations()
{
return array(
'product_cat' => 'AND',
'product_tag' => 'AND',
'pa_color' => 'AND'
);
}
動画: https://drive.google.com/file/d/0B4zUhfhZlonlNkVXMEZIdUxlWFU/view?usp=sharing