My website: futurefitness.dk (SSL not installed yet hence the warning)
I am using: X Pro 1.1.1
I need to add the following global javascript snippet to my header, in order to show a widget that allows visitors to sign up for my messenger bot:
<!-- ManyChat -->
<script src="//widget.manychat.com/714323188721850.js" async="async">
</script>
However, I cannot find the correct file to copy to my child theme.
I read in an old post that I should copy _header.php from the global folder, but that does not exist in my current version of x pro.
I do however have the folder called header with two files: base and masthead.
Another way I found was adding this code in the functions.php file in the child theme, however it isn’t working for me, and I am not sure where my mistake lies.
add_action( ‘wp_head’, ‘add_head_script’, 999 );
<?php }
function add_head_script(){
?>
<!-- Your scripts will go here -->
To test the code, I have added a code that should show a signup button just below the first big orange button, in between the two grey lines.:
<div class="mcwidget-embed" data-widget-id="560782"></div>
Please help me understand where the issue lies, which file, and where in the file, I need to use for this code javascript code to properly show my widget.
I also read in another post that _header.php in the …legacy/cranium/… was used for Google tag, is that a good place in general, or is it only for the tag and possibly Google Analytics? - This is also interesting for me to know for later purposes.
Thank you so much for a detailed answer!!