Array ( [where] => AND ( tgs_term_relationships.term_taxonomy_id IN (35,92,93,178,305,414,621,654,3133) AND tt1.term_taxonomy_id IN (1252,1603,1760,1606,1231,2363,3152) AND tgs_posts.ID NOT IN ( SELECT object_id FROM tgs_term_relationships WHERE term_taxonomy_id IN (8) ) AND tt2.term_taxonomy_id IN (35,92,93,178,305,414,621,654,3133) ) AND ((tgs_posts.post_type = 'product' AND (tgs_posts.post_status = 'publish' OR tgs_posts.post_status = 'acf-disabled' OR tgs_posts.post_status = 'unread' OR tgs_posts.post_status = 'read'))) [groupby] => tgs_posts.ID [join] => LEFT JOIN tgs_term_relationships ON (tgs_posts.ID = tgs_term_relationships.object_id) LEFT JOIN tgs_term_relationships AS tt1 ON (tgs_posts.ID = tt1.object_id) LEFT JOIN tgs_term_relationships AS tt2 ON (tgs_posts.ID = tt2.object_id) LEFT JOIN tgs_term_relationships AS sort_tr ON tgs_posts.ID = sort_tr.object_id LEFT JOIN tgs_term_taxonomy AS sort_tt ON sort_tr.term_taxonomy_id = sort_tt.term_taxonomy_id AND sort_tt.taxonomy = 'product_cat' [orderby] => MIN(CASE WHEN sort_tt.term_id = 654 THEN 0 WHEN sort_tt.term_id = 414 THEN 1 WHEN sort_tt.term_id = 305 THEN 2 WHEN sort_tt.term_id = 93 THEN 3 WHEN sort_tt.term_id = 92 THEN 4 WHEN sort_tt.term_id = 178 THEN 5 WHEN sort_tt.term_id = 3133 THEN 6 WHEN sort_tt.term_id = 621 THEN 7 ELSE 999 END) ASC, CASE WHEN tgs_posts.menu_order = 0 THEN 999999 ELSE tgs_posts.menu_order END ASC, tgs_posts.post_title ASC [distinct] => [fields] => tgs_posts.* [limits] => LIMIT 0, 36 )