O
O
on_click2020-04-29 12:58:30
SQL
on_click, 2020-04-29 12:58:30

How to get the id of posts with a specific polylang sql query?

Good afternoon

The site has acf and polylang plugins
. api data, you need to get a list of id stored in posts using acf, taking into account the current language, and the problem is that I can’t find how to limit the selection to a specific language

. As far as I understand, you first need to get a list of post ids that are associated with a specific language and after combining it with the query below, please tell me how such a query should look like, I can not find anything on the topic.

SELECT * FROM `wp_postmeta` WHERE `meta_key` LIKE 'type_%_id' AND `meta_value` > ''

Perhaps there is a way to limit this selection at once?
I would appreciate any hint, thanks!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question