I checked both the Default and English pages and understood the issue. It seems the background image is added through custom CSS. In the case of custom CSS, you will need to define the CSS one more time by targeting the secondary language. Otherwise, the CSS may not work properly. Please check by adding the CSS rule again for the English language and see if that helps resolve the issue. Here are the steps:
- Please copy the existing CSS code and paste it right below the existing CSS.
- At the beginning of the pasted CSS, add the language selector CSS property "html[lang="en-US"]". Adjust the 'en-US' depending on the language. To find the correct code, inspect the page and check the "lang" attribute within the HTML tag. The CSS for the English language should look like this:
thank your for your help! This code works for now, but I think this cannot be the final way to go.
The background image has been added "normally" using the Divi builder, no custom coding involved.
On other pages, which I haven't touched in a while, the background image is showing correctly in both languages. But as soon as I edit a page (only minor text updates), the background images on the translated page disappears.
Based on the WPML Debug Info, the translation settings for the CSS and other style fields are set to "Copy." This means that style adjustments made within the Divi editor should be copied to the translations without any issues. Additionally, there are also no errors related to Divi CSS being reported.
The issue you're having could be due to the caches. Would you please try the following steps and check again?
- Please clear the caches from your site and Browser. if server-level caching is enabled, clear from there as well.
- Now, go to WPML > Support > troubleshooting.
- Click on the following buttons:
-- Clear the cache in WPML
-- Assign translation status to duplicated content
-- Set language information
-- Fix post-type assignment for translations
- Once done, open any page and make a minor update.
- Update the translation and check if you're still having the issue.
Let me know the update. I will be happy to help if you need further assistance in this matter.
Glad to hear that the suggestion helped to solve the issue. 🙂
Regarding the CSS issue you reported in the other ticket: If the CSS styles are added via the style controller within the Divi editor, they should be copied to the translation when you add or update the translation. Since you're still experiencing issues, please open the default page in the editor and make slight adjustments to the styles and content.
Once done, clear the caches from your site and browser, then update the translation. It should help in solving the issue.
But, if you need further assistance, please feel free to share the update in the other ticket. I will be happy to help.
Best regards,
Prosenjit
The topic ‘[Closed] Divi theme: Background image link on translation not including file name’ is closed to new replies.