Viewing 5 posts - 1 through 5 (of 5 total)
-
AuthorPosts
-
March 18, 2016 at 8:47 pm #600547
hi, i want to add a widget snippet to my enfold theme?
“This is your widget snippet. Copy-paste it into the code of the pages you want to chat on. Right before the </head> tag is the best option.”
<!-- Chatra {literal} --> <script> ChatraID = 'RRRXdJSx7rcmqw'; (function(d, w, c) { var n = d.getElementsByTagName('script')[0], s = d.createElement('script'); w[c] = w[c] || function() { (w[c].q = w[c].q || []).push(arguments); }; s.async = true; s.src = (d.location.protocol === 'https:' ? 'https:': 'http:') + '//call.chatra.io/chatra.js'; n.parentNode.insertBefore(s, n); })(document, window, 'Chatra'); </script> <!-- /Chatra {/literal} -->
Where an how can i add this snippet into the site? i use an enfold child theme. can i add this to the footer.php (child)?? to which position in the code?
thank you very much.
March 18, 2016 at 11:23 pm #600573Hey diefleischerei!
Yes, the best position is on the enfold-child.
Please do let us know if you need anything else, we will be happy to assist.Regards,
BasilisMarch 18, 2016 at 11:56 pm #600584And where? Can you please help me with the exact position :) Thank you Basilis.
March 21, 2016 at 6:14 am #601028Hi,
Please try the following in your child themes function.php:
function add_custom_code() { ?> <script> ChatraID = 'RRRXdJSx7rcmqw'; (function(d, w, c) { var n = d.getElementsByTagName('script')[0], s = d.createElement('script'); w[c] = w[c] || function() { (w[c].q = w[c].q || []).push(arguments); }; s.async = true; s.src = (d.location.protocol === 'https:' ? 'https:': 'http:') + '//call.chatra.io/chatra.js'; n.parentNode.insertBefore(s, n); })(document, window, 'Chatra'); </script> <?php } add_action('wp_head', 'add_custom_code');
Best regards,
RikardMarch 21, 2016 at 9:39 am #601125Perfect. Thank you. CLOSED.
-
AuthorPosts
Viewing 5 posts - 1 through 5 (of 5 total)
- The topic ‘widget snippet’ is closed to new replies.