Skip Navigation

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

Problem:
You are trying to set different font sizes for the header in the default language and the second language on your site, but two versions of the style files are being loaded on the front end, causing the styles to be incorrect.
Solution:
We recommend adding custom CSS to target the specific elements for each language. For example, you can add the following CSS code to your site:

span.aux-menu-label {<br />    font-size: 15px;<br />}

This code should be added to the custom CSS section of your site, which can typically be accessed via the WordPress admin panel under Appearance > Customize > Additional CSS.

If this solution does not resolve your issue, or if it seems outdated or not applicable 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 further assistance is needed, please open a new support ticket at WPML support forum.

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 Bruno Kos 7 months, 3 weeks ago.

Assisted by: Bruno Kos.

Author Posts
October 11, 2024 at 10:03 am

yenyiC

Background of the issue:
I am trying to set different font sizes for the header in the default language and the second language on my site hidden link using WPML.

Symptoms:
Two versions of the style files are being loaded on the front end, causing the styles to be incorrect.

Questions:

October 11, 2024 at 10:52 am
October 11, 2024 at 10:55 am #16278927

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

Let me know if you have any questions.

October 14, 2024 at 1:44 am #16283761

yenyiC

Hi, the font size of the menu text in the English version doesn't seem to have been changed to 15px.

October 14, 2024 at 7:30 am #16284225

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

Would you be willing to provide me with WordPress credentials so I could investigate the issue directly?

Logins you previously shared with me were automatically removed.

October 14, 2024 at 7:33 am
October 14, 2024 at 10:37 am #16285254

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

I added:

span.aux-menu-label {
    font-size: 15px;
}

to hidden link, as it seems like there is some custom identifier here.

Is this how it should look like?

October 15, 2024 at 2:25 am #16288277

yenyiC

Yes, the font has been successfully modified, but my question is whether it is normal for the English version to also load the CSS file for the Chinese version?

Please check my screenshot:
post-84 is the file for the Chinese header.
post-2697 is the file for the English header.

16278475-截圖 2024-10-11 下午6.00.55.png
October 15, 2024 at 7:23 am #16288861

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

It is not unusual for multiple CSS files to be loaded on the same page if different languages or versions of the page share common elements or if the CSS is set up to serve styles for multiple languages, especially on sites where language switching is enabled.

In your case:

- post-84.css seems to target the Chinese version of the header.
- post-2697.css seems to target the English version of the header.

If both versions are loaded simultaneously, it's likely that the site uses a global CSS or a combination of language-specific CSS that may cause both files to load, even though they target different versions of the header.

October 15, 2024 at 8:47 am #16289361

yenyiC

I found out that the issue was caused by my theme. Thank you for your patient support.