SELECT SQL_CALC_FOUND_ROWS ent_posts.ID FROM ent_posts LEFT JOIN ent_term_relationships ON (ent_posts.ID = ent_term_relationships.object_id) JOIN ent_icl_translations t
ON ent_posts.ID = t.element_id
AND t.element_type = CONCAT('post_', ent_posts.post_type) WHERE 1=1 AND (
ent_term_relationships.term_taxonomy_id IN (58)
) AND ent_posts.post_type = 'du-an-project' AND (ent_posts.post_status = 'publish' OR ent_posts.post_status = 'acf-disabled') AND ( ( ( t.language_code = 'ja' OR 0 ) AND ent_posts.post_type IN ('post','page','attachment','popup','acf-field-group','dich-vu-service','dao-tao-edu','du-an-project','khach-hang-customer','tin-tuc-news','bao-chi-news' ) ) OR ent_posts.post_type NOT IN ('post','page','attachment','popup','acf-field-group','dich-vu-service','dao-tao-edu','du-an-project','khach-hang-customer','tin-tuc-news','bao-chi-news' ) ) GROUP BY ent_posts.ID ORDER BY ent_posts.menu_order, ent_posts.post_date DESC LIMIT 0, 30