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.

No supporters are available to work today on this forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

This topic contains 1 voice and has 0 replies.

>
Author Posts
September 7, 2024 at 1:37 pm #16151365

hasanK-7

Background of the issue:
I am trying to add custom JavaScript for each specific language on my site hidden link. I referenced this answer: https://wpml.org/forums/topic/only-include-javascript-snippet-on-1-language/ and added it to the functions.php file, but it didn't work.

Symptoms:
The custom JavaScript snippet added to functions.php did not work as expected.

Questions:
Why is the custom JavaScript snippet not working when added to functions.php?
Is there a specific way to add custom JavaScript for different languages in WPML?

September 7, 2024 at 1:55 pm #16151371

hasanK-7

i copy the code worngly