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.

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by mariuszC-6 1 year, 6 months ago.

Assisted by: Marcel.

Author Posts
September 13, 2023 at 3:52 pm #14391477

mariuszC-6

Could you please tell me if WPML has a dedicated language tag that allows the removal of a function only from the German language version (attachment)?

September 13, 2023 at 3:57 pm #14391583

Marcel
Supporter

Languages: English (English ) German (Deutsch )

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

Hi,

we don't have that function, but you can call the specific language HTML code and hide the section (css class) only for German via CSS:

Here is an example:

html:not([lang="de"]) .delivery-time {   display: none!important; }

Best Regards
Marcel

September 15, 2023 at 6:48 am #14400789

mariuszC-6

Hi,
I added this code and based on it, I created a second one. As a result, the feature disappears on other language versions. Can you help me find and understand what the mistake is?

html:not([lang="de"]) .delivery-time { display: none!important; }
html:not([lang="de"]) .delivery-popup { display: none!important; }

Edit:

Correct code :

html[lang="de-DE"] .delivery-time {
display: none !important;
}

html[lang="de-DE"] .delivery-popup {
display: none !important;
}