This thread is resolved. Here is a description of the problem and solution.
Problem:
You need to use PHP to check if the current page or a custom post type (CPT) post is translated into its secondary language. Depending on the translation status, you want to display different text messages.
Solution:
We recommend using the
wpml_element_has_translations
filter to determine if a post type or a taxonomy term has translations available. For implementing this, you can refer to the WPML Hooks Reference for detailed guidance on how to use this filter.
For more information, please visit the WPML element has translations and the WPML Hooks Reference.
If this solution does not apply to your case, or if it seems outdated, 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 further assistance is needed, please open a new support ticket.
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.