[Resolved] Featured image not available for translated page
This thread is resolved. Here is a description of the problem and solution.
Problem:
The featured images are not available on some translated pages.
Solution:
To fix this issue, please try the following steps:
1. Edit the post in the original language
2. Go to the Media attachments translation options
3. Enable the following options:
- Duplicate media attachments for translations
- Duplicate featured images for translations
4. Save the post and update the translation
0% of people find this useful.
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.
1. Open your database using phpMyAdmin(or another database manager)
2. Go to the SQL tab and run the following query:
SELECT DISTINCT post_id FROM `wp_postmeta` WHERE (`meta_key` = '_wpml_media_duplicate' AND `meta_value` = '0') OR (`meta_key` = '_wpml_media_featured' AND `meta_value` = '0');
This will give you the list of post IDs where any of the two settings for the post are unchecked.
Thank you, that query helps to find all posts. I modified it in order to only find the right post types and the posts in the default language, and to display post names too so I can easily find them.
SELECT DISTINCT wp_postmeta.post_id, wp_posts.post_name, wp_posts.post_type FROM wp_postmeta
JOIN wp_posts
ON wp_postmeta.post_id = wp_posts.ID
JOIN wp_icl_translations
ON wp_postmeta.post_id = wp_icl_translations.element_id
WHERE ((wp_postmeta.meta_key = '_wpml_media_duplicate' AND wp_postmeta.meta_value = '0') OR (wp_postmeta.meta_key = '_wpml_media_featured' AND wp_postmeta.meta_value = '0'))
AND (wp_icl_translations.language_code = 'en')
AND (
(wp_posts.post_type = 'page')
OR (wp_posts.post_type = 'vendor')
);