This thread is resolved. Here is a description of the problem and solution.
Problem:
The client was experiencing an issue where HTML code within an Elementor Pro HTML widget was appearing on the translation page, and the client was being forced to translate it.
Solution:
We recommended moving the code from the Elementor HTML widget to the
functions.php
file of the client's Child Theme. We provided the following code to correctly add JavaScript to the theme, which prevents the Advanced Translation Editor (ATE) from confusing HTML and script code:
function custom_jquery_script() {
?>
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery('#voltar').on('click', function() {
window.history.go(-1);
return false;
});
});
</script>
<?php
}
add_action('wp_footer', 'custom_jquery_script');After applying this change, the English version should display correctly and execute the JavaScript code without it appearing in the translation editor.
If this solution does not apply to your case, or if it seems outdated, we highly recommend checking the related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. Should you need further assistance, please do not hesitate to open a new support ticket in our 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 7 replies, has 2 voices.
Last updated by 1 year, 9 months ago.
Assisted by: Christopher Amirian.



