Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1009905

    Hi, my client has sent code for ProProfs. I’m not sure where best to put this in Enfold. Previously I’ve put in sidebar widget, but that will miss out the home page.

    I have a child theme, so not sure I should put in the header or if there’s another place that would be better? Not sure what tag it should go before or after.

    thank you.

    #1009906

    For now I’ve put it in the sidebar widget so it is working on pages/posts, but I want it on the home page as well, so I think it needs to go in the header template, but I’m not sure exactly where is best. I do have a header.php in child theme.

    #1009926

    Instructions from proprofs are to put just before the </body> tag.

    #1010024

    Hi,

    Please try this in your functions.php file in your child theme:

    function ac_add_proprofs_code(){
    ?>
    <!– ProProfs Chat code starts –><div id=”l2s_trk” style=”z-index:99;”>add chat to your website</div><script type=”text/javascript”> var l2s_pht=escape(location.protocol); if(l2s_pht.indexOf(“http”)==-1) l2s_pht=’http:’; (function () { document.getElementById(‘l2s_trk’).style.visibility=’hidden’; var l2scd = document.createElement(‘script’); l2scd.type = ‘text/javascript’; l2scd.async = true; l2scd.src = (‘https:’ == document.location.protocol ? ‘https://’ : ‘http://’) + ‘live2support.com/js/lsjs1.php?stid=32219&jqry=Y&l2stxt=’; var l2sscr = document.getElementsByTagName(‘script’)[0]; l2sscr.parentNode.insertBefore(l2scd, l2sscr); })(); </script><!– ProProfs Chat code closed –>
    <?php
    }
    add_action('wp_head', 'ac_add_proprofs_code');

    If should also work in the Analytics box under Enfold->Google Services.

    Best regards,
    Rikard

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.