Need to switch language before WP_Query
-
Hi,
I’m trying to make my code compatible with Polylang. So far it only works with WPML, so I try to figure out the equivalent for your plugin.
I need to switch the language before retrieving posts with WP_Query so that I can parse the posts for all available languages. With WPML I would call before retrieving the posts:
$sitepress->switch_lang( $language_code );
What would be the equivalent for Polylang?
Thanks!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Need to switch language before WP_Query’ is closed to new replies.