Skip Navigation

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

Problem:
You are experiencing issues with displaying translated taxonomy terms attached to a custom post type using the function

get_the_terms()

. The terms always appear in the default language, and the

$current_ID

variable returns nothing, which prevents displaying links to the translated taxonomy terms.
Solution:
First, ensure that your code functions correctly in the default language. If it does, the issue might be related to how the translations and taxonomy terms are set up in WPML. Here are the steps we recommend:
1. Verify that each post and its corresponding taxonomy terms are translated into the desired languages.
2. In the WPML settings, configure your custom post type (CPT) and taxonomy to be 'Translatable - only show translated items'.
3. Check if the issue persists using a default WordPress theme, as custom themes can sometimes cause conflicts.
If these steps do not resolve the issue, it might be due to outdated methods or incompatibilities with your current setup. We highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins.

If the problem continues, please open a new support ticket with us 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.

Tagged: 

This topic contains 15 replies, has 2 voices.

Last updated by Dražen Duvnjak 1 week, 1 day ago.

Assisted by: Dražen Duvnjak.

Author Posts
October 30, 2024 at 9:54 am #16345799

Dražen Duvnjak
Supporter

Languages: English (English )

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

Hello,

it will not work like that, posts and categories need to be translated and set the mentioned settings above set. If they are not translated that means they do not exist in that language and nothing can be assigned them, not the 2nd language taxonomy.

Regards,
Drazen

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.