 SELECT SQL_CALC_FOUND_ROWS  wprb_posts.ID FROM wprb_posts  LEFT JOIN wprb_term_relationships ON (wprb_posts.ID = wprb_term_relationships.object_id) JOIN wprb_icl_translations t ON wprb_posts.ID = t.element_id AND t.element_type = CONCAT('post_', wprb_posts.post_type)  WHERE 1=1  AND ( wprb_term_relationships.term_taxonomy_id IN (3,1) ) AND wprb_posts.post_type = 'post' AND (wprb_posts.post_status = 'publish' OR wprb_posts.post_status = 'tribe-ea-success' OR wprb_posts.post_status = 'tribe-ea-failed' OR wprb_posts.post_status = 'tribe-ea-schedule' OR wprb_posts.post_status = 'tribe-ea-pending' OR wprb_posts.post_status = 'tribe-ea-draft') AND ( ( ( t.language_code = 'en' OR ( t.language_code = 'es' AND wprb_posts.post_type IN ( 'post' ) AND ( ( ( SELECT COUNT(element_id) FROM wprb_icl_translations WHERE trid = t.trid AND language_code = 'en' ) = 0 ) OR ( ( SELECT COUNT(element_id) FROM wprb_icl_translations t2 JOIN wprb_posts p ON p.id = t2.element_id WHERE t2.trid = t.trid AND t2.language_code = 'en' AND ( p.post_status = 'publish' OR p.post_type='attachment' AND p.post_status = 'inherit' ) ) = 0 ) ) ) ) AND wprb_posts.post_type  IN ('post','page','attachment','wp_block','testimonials','tribe_venue','tribe_organizer','tribe_events' )  ) OR wprb_posts.post_type  NOT  IN ('post','page','attachment','wp_block','testimonials','tribe_venue','tribe_organizer','tribe_events' )  ) GROUP BY wprb_posts.ID ORDER BY wprb_posts.post_date DESC LIMIT 1730, 10;