How to write inner join using posts_clauses?

Question

Can someone please show me how I can achieve the same result with this SQL:

SELECT *
FROM wp_2_posts
INNER JOIN wp_2_icl_translations
ON wp_2_icl_translations.element_id = wp_2_posts.id
AND wp_2_icl_translations.language_code = 'en'
WHERE wp_2_posts.post_type = 'properties';

Using posts_clauses ? In other words I’d like a posts_clauses filter to perform the same query as the one shown above in SQL.

I am trying to query posts that are only in English.

0
, robskrob 4 years 2020-05-28T12:10:24-05:00 0 Answers 83 views 0

Leave an answer

Browse
Browse