Skip Navigation

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.

This topic contains 6 replies, has 2 voices.

Last updated by janeH-5 1 year, 10 months ago.

Assisted by: Waqas Bin Hasan.

Author Posts
July 17, 2023 at 6:57 pm #14053119

janeH-5

Example Posts:
English: hidden link
Spanish: hidden link

Social Share container just above the footer has some css for centering it and changing the width on narrower screens that I added to the Avada Theme's Custom CSS area (Avada/Options/Custom CSS):

.fusion-theme-sharing-box {width:50%; margin:0 auto 0;}

@media screen and (max-width: 1075px) {.fusion-theme-sharing-box {width:100%;}}

Problem: it does't work on the Spanish posts. How do I make it work?

July 18, 2023 at 9:26 am #14056891

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting the support.

First of all, I'll advise to fix WP Memory Limit to improve the overall performance.

You can set WP Memory Limit in your wp-config.php file by adding following code:

define( 'WP_MEMORY_LIMIT', '128M' );
define( 'WP_MAX_MEMORY_LIMIT', '256M' );

Remember to add these lines before the line where it says:
/* That's all, stop editing! Happy publishing. */

Then, this could be due to the way the page builder or the theme stores the styling for the content. Some store the styling in a custom field (the custom field usually contains the "style" or "css" or "layout" or "styling" wording) and that custom field might need to first be set to "copy" in order to have the styling being carried over to the translated page.

After doing this, you should first make a small change to the default language, then save the page, then go to the translation of that page and re-save it - and the CSS should be copied over.

You can also enforce a language selector for your CSS like:

:lang(es) .fusion-theme-sharing-box {width:50%; margin:0 auto 0;}
@media screen and (max-width: 1075px) {:lang(es) .fusion-theme-sharing-box {width:100%;}}

Also try with es-ES if simple es doesn't work.

Regards.

July 20, 2023 at 4:37 pm #14074341

janeH-5

Can you explain in detail how to do the below instruction from the above response? (How would I find out where the Avada theme stores the styling, and how do I set something to "copy"?)

"Then, this could be due to the way the page builder or the theme stores the styling for the content. Some store the styling in a custom field (the custom field usually contains the "style" or "css" or "layout" or "styling" wording) and that custom field might need to first be set to "copy" in order to have the styling being carried over to the translated page.

After doing this, you should first make a small change to the default language, then save the page, then go to the translation of that page and re-save it - and the CSS should be copied over."

July 21, 2023 at 8:21 am #14076855

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Themes and plugins store these options in custom fields, which you can find by going to WPML → Settings and scrolling to the Custom Field Translation section.

hidden link

Here you can search for the said options. You may also need to click "Show system fields" to bring the hidden fields as well.

Check https://wpml.org/documentation/getting-started-guide/translating-custom-fields/ for an understanding.

July 24, 2023 at 4:45 pm #14091557

janeH-5

Still working on it.

July 25, 2023 at 10:48 am #14095651

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Sure, take your time.

July 26, 2023 at 12:40 am #14099119

janeH-5

Finally got it to work. The only way to make the CSS affect the Spanish pages was to paste it into each post's custom CSS (not the site-wide custom CSS). Then I made a small change to each post and re-translated them all. (The custom field for the custom css didn't have the option for setting it to "copy". It was grayed out.)