Quantcast
Viewing all articles
Browse latest Browse all 11471

frafor on "Polylang, ACF and direct db query"

Hi to all,

I'm using Polylang (latest ver) together with Advanced Custom Fields plugin, with the Repeater Field addon.

I neet to retrieve the posts matching a specific sub-field value.

I cannot query posts via WP_query or get_posts because of the Repeater Field structure and so I'm querying the db to get the posts as this tutorial suggests (my situation it's the same):

http://www.advancedcustomfields.com/resources/tutorials/querying-the-database-for-repeater-sub-field-values/

Everything works as expected, except the fact that, obviously, querying the db means that the query retrieves posts regardless their language.

How can i modify the db query to target even the post language?

I've looked in the db to see if there's a key storing the language value in wp_postmeta table, but i couldn't find it.

Thanks!

https://wordpress.org/plugins/polylang/


Viewing all articles
Browse latest Browse all 11471

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>