Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #762245

    Rue Nel
    Moderator

    Hello Jackson,

    Thanks for the updates! Please edit your page and make sure to add a custom cv-donate class in your button. This is what you have missed that is why the button doesn’t work.

    Please let us know how it goes.

    #762811

    ibracedirector2016
    Participant

    I’m getting this error, Do you know what this means?

    #762838

    ibracedirector2016
    Participant

    Actually, ignore above^ It’s working, Thanks So much for your Help!!!! The page does seem to keep loading though, like it never finished loading, just says waiting for available socket…

    #762861

    Thai
    Moderator

    Glad everything is working 🙂

    If you need anything else, please let us know.

    #882216

    mthomas91
    Participant

    HI,

    my domain is – http://www.matchedbettor.co.uk

    I want to add code to my header to get live chat form Zendesk to only appear on certain pages.

    However I can only find one header file and it makes the live chat show on every single page.

    How can I solve this?

    Here is the code I am using –

    <!-- Start of profitgenie Zendesk Widget script -->
    <script>/*<![CDATA[*/window.zEmbed||function(e,t){var n,o,d,i,s,a=[],r=document.createElement("iframe");window.zEmbed=function(){a.push(arguments)},window.zE=window.zE||window.zEmbed,r.src="javascript:false",r.title="",r.role="presentation",(r.frameElement||r).style.cssText="display: none",d=document.getElementsByTagName("script"),d=d[d.length-1],d.parentNode.insertBefore(r,d),i=r.contentWindow,s=i.document;try{o=s}catch(c){n=document.domain,r.src='javascript:var d=document.open();d.domain="'+n+'";void(0);',o=s}o.open()._l=function(){var o=this.createElement("script");n&&(this.domain=n),o.id="js-iframe-async",o.src=e,this.t=+new Date,this.zendeskHost=t,this.zEQueue=a,this.body.appendChild(o)},o.write('<body onload="document._l();">'),o.close()}("https://assets.zendesk.com/embeddable_framework/main.js","profitgenie.zendesk.com");
    /*]]>*/</script>
    <!-- End of profitgenie Zendesk Widget script -->
    #883193

    Friech
    Moderator

    Hi There,

    Remove the code from header file, and add the code below on your child theme’s functions.php file.

     function my_custom_head_output() { 
      if (is_page( XX )): ?>
       <!-- Start of profitgenie Zendesk Widget script -->
    <script>/*<![CDATA[*/window.zEmbed||function(e,t){var n,o,d,i,s,a=[],r=document.createElement("iframe");window.zEmbed=function(){a.push(arguments)},window.zE=window.zE||window.zEmbed,r.src="javascript:false",r.title="",r.role="presentation",(r.frameElement||r).style.cssText="display: none",d=document.getElementsByTagName("script"),d=d[d.length-1],d.parentNode.insertBefore(r,d),i=r.contentWindow,s=i.document;try{o=s}catch(c){n=document.domain,r.src='javascript:var d=document.open();d.domain="'+n+'";void(0);',o=s}o.open()._l=function(){var o=this.createElement("script");n&&(this.domain=n),o.id="js-iframe-async",o.src=e,this.t=+new Date,this.zendeskHost=t,this.zEQueue=a,this.body.appendChild(o)},o.write('<body onload="document._l();">'),o.close()}("https://assets.zendesk.com/embeddable_framework/main.js","profitgenie.zendesk.com");
    /*]]>*/</script>
    <!-- End of profitgenie Zendesk Widget script -->
     <?php endif; } 
    add_action( 'wp_head', 'my_custom_head_output', 99 ); ?>

    Replace the XX with the page ID, where you want the live chat to appear.

    How to Locate Post/Page IDs

    Hope it helps, Cheers!

    #884269

    mthomas91
    Participant

    That worked a treat.

    Thanks!

    #885130

    Friech
    Moderator

    Glad we could help.

    Cheers!

    #1032846

    skirttheceiling
    Participant

    Hi,

    I’d like to add a lucky orange code to my header, do I need to do the whole child theme thing?

    Below is the code that i’m supposed to add

    <script type=’text/javascript’>
    window.__lo_site_id = 54457;

    (function() {
    var wa = document.createElement(‘script’); wa.type = ‘text/javascript’; wa.async = true;
    wa.src = ‘https://d10lpsik1i8c69.cloudfront.net/w.js’;
    var s = document.getElementsByTagName(‘script’)[0]; s.parentNode.insertBefore(wa, s);
    })();
    </script>

    #1033359

    Friech
    Moderator

    Hi There,

    Yes, you need to add the code on your child theme’s functions.php file. SO it wont be over written when you do update the parent theme.

    Please update your code to this:

     function my_custom_head_output() { ?>
      <script type='text/javascript'>
    window.__lo_site_id = 54457;
    
    (function() {
    var wa = document.createElement('script'); wa.type = 'text/javascript'; wa.async = true;
    wa.src = 'https://d10lpsik1i8c69.cloudfront.net/w.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(wa, s);
    })();
    </script>
     <?php  } 
    add_action( 'wp_head', 'my_custom_head_output', 99 ); ?>

    Hope it helps, Cheers!

    #1065898

    Simon T
    Participant

    Hi Guys,

    I also need to place a code into my functions.php file and have copied the file from:

    wp-content/themes/x/framework/views/global/_header.php

    I’ve made the changes and now gone to put it in my child theme but this is far as my FTP goes (there are no folders beyond this point). Does this mean there is something missing from the child theme:

    wp-content/themes/x-child

    #1066197

    Friech
    Moderator

    Hi There,

    Please reinstall your child theme, initially child theme should contain three files and a framework folder .


    screenshot

    And Im not sure why you copied the _header.php file? While the code is need to be on the child theme’s functions.php file. Please clarify.

    Thanks.