I have a site using the old relationships many-to-many model (joint table). We are also using WPML to present the site in English and Spanish.
When I create a new child post on this many-to-many relationship, it stores the ID of the post in the language that we're viewing the site. However, we want the relationship to also be translated.
We have a Toolset View that presents that data based on the values in this joint table of the many-to-many relationship.
Eg. If someone creates the child post of the many-to-many relationship in English, we also want it to work in Spanish.
Can you please help?
Hello,
How do you setup the old relationships many-to-many model? with legacy post type relationship(_wpcf_belongs_{slug }_id) or new post type relationship?
Are you using old version of Toolset Types plugin and WPML plugin? if it is, which versions are you using?
I need to test it in my localhost. thanks
Hi Luo.
I'm using the legacy post type relationship with the latest version of Toolset Types plugin and WPML plugin.
Please provide your website database dump file in below private message box, also point out the child post URL and parent post URL, I need to test it in my localhost, thanks
I have tried the package link you provided above, it is 404 error due to file size, please put the package file in your own google drive disk, and share the link only, private message box enabled again.
I can download the file, will update here if find anything
I can install the SQL file you provided above in my localhost, but there isn't any post are using ID 11997 or 11996 as your screenshots:
hidden link
hidden link
So I have tried the latest "Submittal Item" post(ID: 8102), there are two custom fields in it:
- wpcf-submittal-item-product-id
- wpcf-submittal-product-number-id
They seem to be post IDs of other post type, which are the old relationship we talking about.
If they are, please try these:
1) Dashboard-> WPML-> Settings-> Multilingual Content Setup
in section "Post Types Translation", find post type "Submittal Item", enable option "Translatable", save.
Then edit the "Submittal Item" posts again, you should be able to see section "Language", and you can use it to translate the "Submittal Item" post + custom fields into other languages
More help:
https://wpml.org/tutorials/2016/08/how-to-create-and-translate-custom-post-types/
section "How to translate “Custom Post Types”?"
HI Luo. I'll try your suggestion and report back if it worked.