Skip to content Skip to sidebar

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

Problem:
The client is experiencing an issue where posts in both Spanish and English are displayed on a Spanish page, despite wanting to show only Spanish posts.
Solution:
We recommend checking the WPML settings for the custom post type (CPT) involved. Here are the steps to follow:
1. Navigate to WPML → Settings → Post Types Translation.
2. Find the custom post type you are working with.
3. Ensure it is not set to “Translatable – use translation if available or fallback to default language”.
4. Change the setting to “Translatable – only show translated items”.
Additionally, ensure that your query does not have the

suppress_filters=false

argument, which can cause posts from the default language to appear.
For more details on handling untranslated content, visit WPML documentation on fallback untranslated content.

If this solution does not resolve your issue or seems outdated, please check related known issues at https://wpml.org/known-issues/, verify the version of the permanent fix, and confirm that you have installed the latest versions of themes and plugins. We highly recommend opening a new support ticket for further assistance 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.

This topic contains 3 replies, has 0 voices.

Last updated by Assaf Katz 2 months, 3 weeks ago.

Assisted by: Andrey.

Author Posts
July 14, 2025 at 2:08 pm #17234262

Assaf Katz

Background of the issue:
I am trying to show posts only in a specific (Spanish) language on my website, but it also shows the posts from the default language (English). The issue can be seen on this page: hidden link

Symptoms:
Instead of seeing only posts in Spanish, I am getting posts in both Spanish and English.

Questions:
How can I configure WPML to display posts only in the selected language?
Is there a setting that might be causing posts from the default language to appear?

July 14, 2025 at 2:24 pm #17234417

Andrey
WPML Supporter since 06/2013

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

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

Thank you for contacting WPML support.

Ensure that your query includes the suppress_filters argument, which must be set to 0.

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

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.

You might also want to check other common issues and their solutions that could be relevant

July 14, 2025 at 2:27 pm #17234420

Assaf Katz

Hi!
The problem is with the main query.

I have tried to add “suppress_filters=0 to the pre_get_posts filter with no luck.

You can also see that in the original site (this one is a staging one), we don't have this problem:
hidden link

July 14, 2025 at 2:37 pm #17234443

Andrey
WPML Supporter since 06/2013

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

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

Thank you for your feedback.

I’m unable to access the staging site because a password protects it. However, the issue you’re describing is likely related to the query missing the suppress_filters argument.Try also like this suppress_filters=false

Before adjusting the query, please check your WPML settings (for Post CPT):

1. Go to WPML → Settings → Post Types Translation.
2. Locate the custom post type in question.
3. Make sure it is not set to “Translatable – use translation if available or fallback to default language”.
4. Instead, set it to “Translatable – only show translated items”.

Fallback Untranslated Content to Default Language option:
https://wpml.org/documentation/translating-your-contents/displaying-untranslated-content-on-pages-in-secondary-languages/#fallback-content

July 15, 2025 at 6:47 am #17236169

Assaf Katz

That worked like a charm!
Thanks a lot!