This thread is resolved. Here is a description of the problem and solution.
Problem:
The client needs PHP filters or functions with WPML to retrieve the ID of translated media attached to a Meta Box field group on their homepage.
Solution:
We recommend using the
wpml_object_id
hook to obtain the ID of a translated media. Here is an example of how to use this hook to get the German translation ID for an attachment:
echo apply_filters( 'wpml_object_id', 25, 'attachment', FALSE, 'de' );
If the translation is missing, it will return NULL. For more details, please refer to our documentation:
WPML Object ID Hook
How to Get Other Languages of Current Post
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 you still need assistance, please open a new support ticket 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.