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 thread is resolved. Here is a description of the problem and solution.

Problem:
Tell us what you are trying to do? To make different front page sections appear in different languages in OnePress Child theme. If it is possible to hide some sections in other languages, hope cou could help me to do this. Thanks in advance.
Solution:
You can use this CSS to hide some sections from the secondary language:

html:lang(pl) section#skelbimai, html:lang(pl) section#naujienos, html:lang(pl) section#kontaktai {
    display: none;
}

Just replace skelbimai, naujienos, or kontaktai with the sections from your website.

This topic contains 3 replies, has 2 voices.

Last updated by SiluvosS 4 months, 4 weeks ago.

Assigned support staff: Radu.

Author Posts
May 24, 2019 at 10:33 am #3883533

SiluvosS

Tell us what you are trying to do? To make different front page sections appear in different languages in OnePress Child theme.

Look what I have in LT page and what sections I would like to see in PL page.

hidden link >> hidden link:
KELIONĖ Į ŠILUVĄ >> PODRÓŻ DO SZYDŁOWA - it is OK
APIE ŠILUVĄ TRUMPAI >> KRÓTKO O SZYDŁOWIE - it is OK
KALENDORIUS >> KALENDARZ - it is OK
SKELBIMAI >> none - I would like not to show this section in PL
NAUJIENOS >> none - I would like not to show this section in PL
LANKOMOS VIETOS >> CO WARTO ZOBACZYĆ - it is OK
GALERIJA GALERIA >> ZDJĘĆ - it is OK
KONTAKTAI >> none - I would like not to show this section in PL

If it is possible to hide some sections in other languages, hope cou could help me to do this. Thanks in advance.

Is there any documentation that you are following? Not found..

Is there a similar example that we can see? Not found..

What is the link to your site? LT: hidden link and PL: hidden link

May 24, 2019 at 1:23 pm #3885245

Radu
Supporter

Languages: English (English )

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

Hey Siluvos,

One trick that I can think of, in order to make some sections not be visible in secondary language, is using some CSS. Let's see how things work when you copy the following snippet:

html:lang(pl) section#skelbimai, html:lang(pl) section#naujienos, html:lang(pl) section#kontaktai {
    display: none;
}

to the Appearance → Customize → Additional CSS area. Can you give this a try and tell me how it works, please?

Thanks,
Radu

May 27, 2019 at 8:35 am #3894745

SiluvosS

Yes, it is working perfectly! Thank you very much!

May 27, 2019 at 8:36 am #3894751

SiluvosS

My issue is resolved now. Thank you!