Skip to content Skip to sidebar

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.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 13:00 9:00 – 13:00 9:00 – 13:00 8:00 – 12:00 8:00 – 12:00 -
- 14:00 – 17:00 14:00 – 18:00 14:00 – 18:00 13:00 – 17:00 13:00 – 17:00 -

Supporter timezone: Europe/Zagreb (GMT+02:00)

This topic contains 4 replies, has 2 voices.

Last updated by georgiI-5 No Replies.

Assisted by: Bruno Kos.

Author Posts
August 23, 2023 at 3:15 pm #14279137

georgiI-5

I have a website where I have multiple languages, but for better understanding, let's say I have two languages. English as the primary language, and Spanish as the secondary language.

I created a post in English version and haven't made the translation of that post. Meaning, it doesn't exist in a Spanish version.

This post is created and has category, let's say "Jobs". So when I navigate to the Jobs page, which is a category page in English, this post is listed. Clicking on it shows me the post.

When I open the Jobs page, and switch to Spanish, this post is again listed even though there is no translation for this post, and when I click on the post, it redirects me back to the English version because the Spanish one doesn't exist.

The Jobs page has translation, both in English and Spanish. But this post doesn't.

Is there a posibility, or code that you can provide, to prevent listing posts that don't have a translation on the given category page?

So, when I'm on English version of the Jobs page, show me the post, but when I'm on the Spanish version, don't show it in there.
Hope that makes sense.

August 24, 2023 at 8:47 am #14282731

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

Thank you for contacting WPML support!

What you describe sounds like a fallback being set for this post type:
https://wpml.org/documentation/translating-your-contents/displaying-untranslated-content-on-pages-in-secondary-languages/#using-the-default-language-as-a-fallback-for-untranslated-content

Can you check WPML settings if you have this set for it?

Regards,
Bruno Kos

August 29, 2023 at 12:03 pm #14306825

georgiI-5

Hi!
No, this isn't something that helps.
This setting to Display Untranslated Post Types as a Fallback was already set for post type that we had issues with.
Please read the initial request again.

If I have a post type called Jobs and two posts created inside. They are created under a default language, and I have selected those two posts not to have translations for another language. If I check the Jobs page in the default language, those two posts will be listed. But if I open the Jobs page under another language, they are again listed even though they do not have translations for those languages. Is there a possibility not to have them listed at all in language that they do not exist? Does this make sense? We don't want them to fallback to original language, we won't them not to be listed at all if translation doesn't exists.

The topic ‘[Closed] I want to hide posts from being listed on their category page if no translation’ is closed to new replies.