Tell us what you are trying to do?
Hi there, I'm having this issue where translating a CPT is copying all the custom fields but not the featured image. I could find many threads online about this problem, but the solution doesn't seem to work for us.
The issue happens when we manually create and translate a post in the WordPress dashboard AND when we create a post with a CRED form and then use the PHP action wpml_make_post_duplicates to auto translate the post.
To replicate, please do the following:
- Log into site
- Go to Annonces: hidden link
- Create a new FR post filling all the fields
- Translate the post by duplicating it (the plus sign, you may leave all images the same name)
- Go to the EN version of your new post, the featured image will be empty
We also tried debugging by PHP logging the translated post's feature image and it does seem to indeed have the correct media ID, but does not display in the WP dashboard or on the front-end post.
However, after having translated the post, if you go to the original post with a featured image and save it, the featured image will now appear on the translated post.
The settings at WPML > Media Translation are all checked.
To try and debug this, please first try by creating manual Annonce (Ad) CPT and translating them to gte the featured image to show up. This should also make our CRED hook code work.
Please take control of any page if ever it is being occupied by anyone else. Also, backups at multiple levels have been made, so no worries about that.
I will attach a couple of images of the issue.
Thanks!
Is there any documentation that you are following?
Yes. https://toolset.com/forums/topic/problem-with-feature-image-in-ads-not-copying-to-translated-version/
Is there a similar example that we can see?
Yes. https://toolset.com/forums/topic/problem-with-feature-image-in-ads-not-copying-to-translated-version/
What is the link to your site?
hidden link