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.

Sun Mon Tue Wed Thu Fri Sat
- 12:00 – 16:00 10:00 – 14:00 10:00 – 14:00 9:00 – 13:00 9:00 – 13:00 -
- 17:00 – 21:00 15:00 – 19:00 15:00 – 19:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Europe/Bucharest (GMT+02:00)

This topic contains 4 replies, has 2 voices.

Last updated by Mihai Apetrei 1 year, 11 months ago.

Assisted by: Mihai Apetrei.

Author Posts
January 7, 2023 at 3:14 pm #12768777

nomanM

Hello,

I have to create as many languages as I want, but I don't want to show them in the list on the frontend as it will look awkward. I am trying to hide the language from the hide language option, it is hiding even from the frontend and backend. What is the solution to this, it should not look in the frontend and work properly when I search from the URL.

January 10, 2023 at 8:33 am #12782399

Mihai Apetrei
Supporter

Languages: English (English )

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

Hi there.

I think that you might be referring to the language switcher.

You could go to WPML > Languages > and remove the language switcher altogether. Or you can hide the language switcher on specific pages (https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/how-to-display-or-hide-the-language-switcher-on-specific-pages/).

If you want to hide the languages from the front end, the option that you talked about from the WPML settings will completely hide the languages from the front end for any other users except the ones that have special privileges on the site (admin for example) as explained here:
https://wpml.org/documentation/getting-started-guide/language-setup/hiding-languages-on-the-front-end/

I hope that you will find this information helpful 🙂

Kind regards,
Mihai Apetrei

January 10, 2023 at 5:38 pm #12787761

nomanM

/*Hide menu Language Switcher*/
.wpml-ls-menu-item {
visibility: hidden !important;
}

/*Hide footer Language Switcher*/
.wpml-ls {
visibility: hidden !important;
}

This code is hiding all the languages from the front end, What I want to do is to show some languages on front end and hide other languages. Check out the image for a better understanding. In the image, I want to hide, Singapore, Ireland, Thailand, and other languages that I will add in future.

January 10, 2023 at 5:38 pm #12787763

nomanM

/*Hide menu Language Switcher*/
.wpml-ls-menu-item {
visibility: hidden !important;
}

/*Hide footer Language Switcher*/
.wpml-ls {
visibility: hidden !important;
}

This code is hiding all the languages from the front end, What I want to do is to show some languages on front end and hide other languages. Check out the image for a better understanding. In the image, I want to hide, Singapore, Ireland, Thailand, and other languages that I will add in future.

Languages.JPG
January 12, 2023 at 11:16 pm #12809441

Mihai Apetrei
Supporter

Languages: English (English )

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

Hi there and welcome back.

For hiding those specific buttons from the language switcher, you can indeed use CSS code.

For example, the following code will hide the languages that you mentioned:


#menu-item-wpml-ls-2-en-sg, #menu-item-wpml-ls-2-en-ie, #menu-item-wpml-ls-2-en-th {
display: none !important;
}

That will do exactly what you wanted.

Mihai

The topic ‘[Closed] I want to hide language from front end only!’ is closed to new replies.