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.
This topic contains 15 replies, has 2 voices.
Last updated by Dražen Duvnjak 1 week, 1 day ago.
Assisted by: Dražen Duvnjak.