이 사용자는 즐겨찾는 주제가 없습니다.
즐겨찾는 포럼 주제
포럼 주제가 생성되었습니다.
상태 |
주제
|
서포터 | 목소리 | 게시물 | 선도 |
---|---|---|---|---|---|
Tracking code on our forms works on English site BUT NOT translated site
시작한 사람: dagobertoR
안에: English Support
Problem: Solution: 1. Refer to our documentation on how to use the "wpml_current_language" hook: https://wpml.org/wpml-hook/wpml_current_language/ 2. Add the following PHP code snippet to the functions.php file of your theme: $my_current_lang = apply_filters( 'wpml_current_language', NULL );<br /><br />if($my_current_lang=='es-ES'){<br />//Here goes the tracking code.<br />} 3. Ensure that you use "echo" to output the JavaScript code within the PHP "if" statement, like this: $my_current_lang = apply_filters( 'wpml_current_language', NULL );<br /><br />if ($my_current_lang == 'es-ES') {<br /> echo '<script>"use strict";var simplyconvert_hash = "5bde78b7cdb60170c883efdd3ee8cde9";<br /> !function() {var e = 3e5, n = Math.ceil(new Date() / e) * e, o = document.createElement("script");<br /> o.id = "_scloader", o.type = "text/javascript", o.async = !0, o.src = "//simplyconvert.com/app/embed/"+n+"/load.js";<br /> var i = document.getElementsByTagName("script")[0];i.parentNode.insertBefore(o, i);<br /> }();</script>';<br />} By following these steps, the tracking code should work for the Spanish version of your site as well. If this solution doesn't look relevant to your issue, please feel free to open a new support ticket with us: Contact WPML Support |
|
2 | 6 | 1 년, 6 월 전에 |