Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client reported that custom CSS set in the Appearance > Customize > Additional CSS section was not being applied to the translated version of their page using the Avada theme. Specifically, the CSS ID for an element was not recognized on the translated page, and attempts to edit it with Avada live did not show the container element at all.

Solution:
We addressed the issue by creating custom CSS specifically for the translated version of the page. The following CSS was added to ensure that the styles apply correctly on the translated page:

body.product-template-default .product_cat-broneerimine-en .avada-single-product-gallery-wrapper {<br />    display: none !important;<br />}

This CSS effectively hides the specified element on the translated page as intended. We recommended the client to verify if the solution works on their end.

If this solution does not resolve your issue, or if it seems outdated or irrelevant to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please do not hesitate to open a new support ticket for further assistance.

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.

Tagged: 

This topic contains 6 replies, has 2 voices.

Last updated by andraS 2 years, 8 months ago.

Assisted by: Mihai Apetrei.

Author Posts
August 9, 2022 at 9:14 pm #11836023
andraS

Tell us what you are trying to do?
I have in appearance-customizer some css which is not applied to the translated page. Using Avada theme and for the first language is set special css ID for one element, the page is translated but it does not recognise this element id, If trying to edit with avada live to check if that css id is there, it does not allow to see the container element at all.
We use Woocommerce booking at it is also not possible to choose available times from booking calendar for English version (first language works well)
Third issue is that some translations have like disappeared ( again for woocommerce -booking category) - everything was translated and few days later, some parts of the product are not translated anymore. It does not make sense at all..only thing what i did, i set avada option language to "all languages" to syncronise all settings there.

Is there any documentation that you are following?

Is there a similar example that we can see?

What is the link to your site?
blowbar.ee

August 11, 2022 at 8:49 am #11848267

Mihai Apetrei
WPML Supporter since 03/2018

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hi there.

We can handle only one issue per ticket so I will create new tickets for the other two issues that you mentioned.

In this one, let's handle the CSS-related issue.

1. Can you please let me know the page and the HTML ID that you are referring to?

2. I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Our Debugging Procedures

I will be checking various settings in the backend to see if the issue can be resolved. Although I won't be making changes that affect the live site, it is still good practice to backup the site before providing us access. In the event that we do need to debug the site further, I will duplicate the site and work in a separate, local development environment to avoid affecting the live site.

Privacy and Security Policy

We have strict policies regarding privacy and access to your information. Please see:
https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

**IMPORTANT**

- Please make a backup of the site files and database before providing us access.

- If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box.

The private box looks like this: hidden link

I will be waiting for your response.

Kind regards,
Mihai Apetrei

August 15, 2022 at 7:13 am #11865181

Mihai Apetrei
WPML Supporter since 03/2018

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hi and thank you for the credentials.

I can confirm that I was able to log in successfully.

I am spending more time on this and I will get back to you as soon as I have more feedback.

I will leave the ticket assigned to myself for the moment.

Kind regards,
Mihai

August 17, 2022 at 12:07 pm #11879713

Mihai Apetrei
WPML Supporter since 03/2018

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hi there.

Can you please help me understand which CSS is not applied to the translated version?

From what I was able to see, both look pretty similar and the CSS that you used in the default language in Appearance > Customize > Additional CSS is applied to the secondary language, too, but maybe I am missing something.

I will be waiting for your response.

Mihai

August 18, 2022 at 9:39 am #11885699

andraS

Hello Mihai,

As I wrote in private reply as a comment - I realised that it was not css but snippet in functions file:
I realised that category's hidden images are regulated from functions file not with css. So the aim is that category "broneerimine" product images are hidden.
This is done with the following snippet in the functions file:

add_action( 'wp', 'remove_product_content' );
function remove_product_content() {
// If a product in the 'Broneerimine' category is being viewed…
if ( is_product() && has_term( 'Broneerimine', 'product_cat' ) ) {
//… Remove the images
remove_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_images', 20 );
}
}
Can you advice how to apply it for translated category as well? On demo site it works if product categorry slug is broneerimine-en but on live site not.

August 18, 2022 at 11:52 am #11887015

Mihai Apetrei
WPML Supporter since 03/2018

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Thank you for the explanation.

Now I was able to better understand what you mean.

I don't think we need a function for that, I created this custom CSS and added it to your site:

body.product-template-default .product_cat-broneerimine-en .avada-single-product-gallery-wrapper {
    display: none !important;
}

That should work fine.

Please let me know if it works fine on your end, too.

Mihai

August 21, 2022 at 7:40 pm #11901085

andraS

Thank you, that was helpful!