Does Polylang support WP Query with “meta_query” args?
-
Hi,
I was hoping you could confirm that when a WP_Query uses “suppress_filters” false in the query, that Polylang will update the returned posts array from WP_Query->query() to make sure the returned posts match the current locale (using switch_to_locale() and restore_previous_locale() before and after the query)?
An example query would be:
Array ( [has_password] => [order] => DESC [orderby] => date [post_status] => publish [post_type] => any [paged] => [posts_per_page] => -1 [no_found_rows] => 1 [suppress_filters] => [meta_query] => Array ( [relation] => AND [0] => Array ( [key] => _wpsso_head_info_og_type [value] => product [compare] => = [type] => CHAR ) [1] => Array ( [key] => _wpsso_head_info_is_noindex [value] => 1 [compare] => != [type] => CHAR ) [2] => Array ( [key] => _wpsso_head_info_is_redirect [value] => 1 [compare] => != [type] => CHAR ) ) [fields] => ids )Thanks,
js.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Does Polylang support WP Query with “meta_query” args?’ is closed to new replies.