Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
You are trying to display a list of posts using WP_Query in the site's current language, but the query returns posts in the default language.
Solution:
To ensure that WP_Query returns posts in the current language of the site, you need to modify your query arguments. Specifically, add

"suppress_filters=0"

to your arguments in the WP_Query or get_posts function. This change will allow WP_Query to filter the posts according to the current language.
For more detailed guidance on achieving WPML compatibility with your themes and plugins, please visit: WPML Theme and Plugin Compatibility

If this solution does not apply to your case, or if it seems outdated, we recommend opening a new support ticket. Additionally, we highly recommend checking related known issues at WPML Known Issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. For further assistance, please visit our support forum at WPML Support Forum.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Tagged: 

This topic contains 1 reply, has 0 voices.

Last updated by Andrey 1 month, 2 weeks ago.

Assisted by: Andrey.

Author Posts
April 22, 2025 at 8:12 am #16953570

Assaf Katz

Background of the issue:
I am trying to display a list of posts using WP_Query in the site's current language. The site is currently under development.

Symptoms:
Query returns posts in the default language

Questions:
How can I display a list of posts using WP_Query in the current language of the site?

April 22, 2025 at 4:39 pm #16956635

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for contacting WPML support.

Basically, the WP_Query should return the posts in the language you are viewing in the query.

https://wpml.org/documentation/support/achieving-wpml-compatibility-for-your-themes-and-plugins/

wp_query($args) or get_posts($args) doesn’t filter correct posts IDs for current language +

Solution:

If you use wp_query($args) or get_posts($args) you need to add “suppress_filters=0” to arguments.

There are also other common problems and solutions.