SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts LEFT JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) LEFT JOIN wp_term_relationships AS tt1 ON (wp_posts.ID = tt1.object_id) LEFT JOIN wp_icl_translations wpml_translations
ON wp_posts.ID = wpml_translations.element_id
AND wpml_translations.element_type = CONCAT('post_', wp_posts.post_type) WHERE 1=1 AND (
wp_term_relationships.term_taxonomy_id IN (367)
AND
tt1.term_taxonomy_id IN (367)
AND
wp_posts.ID NOT IN (
SELECT object_id
FROM wp_term_relationships
WHERE term_taxonomy_id IN (237,368)
)
) AND wp_posts.post_type IN ('post', 'etheme_portfolio', 'etheme_ocio') AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'acf-disabled') AND ( ( ( wpml_translations.language_code = 'en' OR 0 ) AND wp_posts.post_type IN ('post','page','attachment','wp_block','popup','etheme_portfolio','etheme_ocio','testimonial' ) ) OR wp_posts.post_type NOT IN ('post','page','attachment','wp_block','popup','etheme_portfolio','etheme_ocio','testimonial' ) ) GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC LIMIT 0, 33