Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #823466

    Hi, sorry I’m not an expert, I set the child theme yesterday and as indicated by the moderator but now I’ve to insert this code:

    <!– WhatsHelp.io widget –>
    <script type=”text/javascript”>
    (function () {
    var options = {
    facebook: “1797539060516164”, // Facebook page ID
    whatsapp: “+393917530878”, // WhatsApp number
    email: “ (Email address hidden if logged out) “, // Email
    sms: “+393917530878”, // Sms phone number
    call: “+3904451920702”, // Call phone number
    company_logo_url: “//scontent.xx.fbcdn.net/v/t1.0-1/p50x50/13882645_1797542767182460_1306336251057963406_n.png?oh=3ce33d265bc113bfb9e6025d5e035521&oe=59FDDD17”, // URL of company logo (png, jpg, gif)
    greeting_message: “Come possiamo aiutarti?”, // Text of greeting message
    call_to_action: “Scrivici”, // Call to action
    button_color: “#666666”, // Color of button
    position: “right”, // Position may be ‘right’ or ‘left’
    order: “facebook,whatsapp,sms,call,email” // Order of buttons
    };
    var proto = document.location.protocol, host = “whatshelp.io”, url = proto + “//static.” + host;
    var s = document.createElement(‘script’); s.type = ‘text/javascript’; s.async = true; s.src = url + ‘/widget-send-button/js/init.js’;
    s.onload = function () { WhWidgetSendButton.init(host, proto, options); };
    var x = document.getElementsByTagName(‘script’)[0]; x.parentNode.insertBefore(s, x);
    })();
    </script>
    <!– /WhatsHelp.io widget –>

    before the </body> tag.

    How should I do this? From wordpress or from FTP client? And where to find the body tag?
    Many thanks

    #823742

    Hey Mattia992,

    To assist you with this issue, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.

    Best regards,
    John Torvik

    #823803

    https://maxfit.it/
    many thanks

    #823952

    Hi,

    Please try this at the bottom of your functions.php file, you can find it under Appearance->Editor.

    function mattia992_whatshelp_io() { ?>
    <script type=”text/javascript”>
    (function () {
    var options = {
    facebook: “1797539060516164”, // Facebook page ID
    whatsapp: “+393917530878”, // WhatsApp number
    email: “ (Email address hidden if logged out) “, // Email
    sms: “+393917530878”, // Sms phone number
    call: “+3904451920702”, // Call phone number
    company_logo_url: “//scontent.xx.fbcdn.net/v/t1.0-1/p50x50/13882645_1797542767182460_1306336251057963406_n.png?oh=3ce33d265bc113bfb9e6025d5e035521&oe=59FDDD17”, // URL of company logo (png, jpg, gif)
    greeting_message: “Come possiamo aiutarti?”, // Text of greeting message
    call_to_action: “Scrivici”, // Call to action
    button_color: “#666666”, // Color of button
    position: “right”, // Position may be ‘right’ or ‘left’
    order: “facebook,whatsapp,sms,call,email” // Order of buttons
    };
    var proto = document.location.protocol, host = “whatshelp.io”, url = proto + “//static.” + host;
    var s = document.createElement(‘script’); s.type = ‘text/javascript’; s.async = true; s.src = url + ‘/widget-send-button/js/init.js’;
    s.onload = function () { WhWidgetSendButton.init(host, proto, options); };
    var x = document.getElementsByTagName(‘script’)[0]; x.parentNode.insertBefore(s, x);
    })();
    </script>
    <?php }
    add_action('wp_footer', 'mattia992_whatshelp_io');

    Best regards,
    Rikard

    #824118

    It doesn’t work sorry.
    Another solution?
    Many thanks

    #824810

    Hi Mattia992,

    In the script above you need to replace all the double quotes

    this “ to " and ” to "

    and the single quotes as well, it will not work otherwise.

    Best regards,
    Victoria

    #824818

    It doesn’t wok sorry. See https://ibb.co/mw9tVQ sorry

    #824997

    Hi,

    What is not woking exactly? Please try to be a bit more specific.

    Best regards,
    Rikard

    • This reply was modified 7 years, 4 months ago by Rikard.
    #825038

    The button should appear on the righ corner of the screen but it doesn’t appear.
    I had to copy the code to the “header.php” file and it worked but now in the child theme there is not the “header.php”. I should I edit it without touching the parent theme?
    Thanks

    #826756

    Hi,

    If the code should have gone into the header then you should have said so, you wanted it before the ending body tag in your initial request.

    You can copy the header.php file into your child theme folder.

    Best regards,
    Rikard

    #826855

    Ok, it works now!
    Many thanks

    #827772

    Hi,

    I’m glad you were able to get this solved. If you need additional help, please let us know here in the forums.

    Best regards,
    Jordan Shannon

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Child theme body tag: where to edit it’ is closed to new replies.