I'm still dealing with custom posts synchronization, as I have lots of IT, EN & FR posts not linked to each other (IT should be the source language). I've found the "wpml_set_element_language_details" action hook and maybe this is what I need, but maybe I'm missing something.
I've tested the following code (just for one post in french), but not working - maybe beacuse is hooked to the wrong hook (wp_footer)? The wpml_element_language_details is working, meaning that the info are retrieved, but it looks like that the wpml_set_element_language_details action is not operating...
...looks like that my code works fine - in my first attempts I've used just the custom post slug instead of post_slug
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.