-
AuthorPosts
-
July 18, 2017 at 7:19 pm #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 thanksJuly 19, 2017 at 8:20 am #823742Hey 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 TorvikJuly 19, 2017 at 10:12 am #823803https://maxfit.it/
many thanksJuly 19, 2017 at 2:03 pm #823952Hi,
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,
RikardJuly 19, 2017 at 7:12 pm #824118It doesn’t work sorry.
Another solution?
Many thanksJuly 20, 2017 at 7:11 pm #824810Hi 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,
VictoriaJuly 20, 2017 at 7:30 pm #824818It doesn’t wok sorry. See https://ibb.co/mw9tVQ sorry
July 21, 2017 at 6:46 am #824997Hi,
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.
July 21, 2017 at 9:17 am #825038The 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?
ThanksJuly 22, 2017 at 5:59 am #826756Hi,
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,
RikardJuly 22, 2017 at 10:03 am #826855Ok, it works now!
Many thanksJuly 22, 2017 at 4:21 pm #827772Hi,
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 -
AuthorPosts
- The topic ‘Child theme body tag: where to edit it’ is closed to new replies.