Adding code

I need to add that code so it shows on every page. It is a chat function, where should it go?

Hi There @hgrantdesigns

Thanks for writing in! It’s hard to guess without knowing more information. Most probably you will have a Javascript code that you need to integrate into your site.

In that case, you will need to setup a child theme first.

function my_custom_script() { 
 	<!-- Replace this line with your JS code -->
}
add_action('wp_footer','my_custom_script');

Or else, provide us with more information to assist you further.

Thanks!

This is what I have

So what would the whole code be and I’d put that in just functions.php?

Hi There,

It’s a JavaScript code, so that you can follow my guide above.

If you want to see a example, please refer to the following post (https://theme.co/apex/forum/t/where-to-add-script-in-x-pro-header-using-child-theme/9884/4?u=mldarshana).

Hope that helps.

Yeah, i added it to the functions.php in the child theme and still nothing.

Hi there.

Please update

<script src="widget.manychat.com/1012671668849316.js" async="async"></script>

to

<script src="//widget.manychat.com/1012671668849316.js" async="async"></script>

Then, kindly check from manychat and see what html tag you will need to add on the page so that the chat function will work just like the thread that was previously linked:

<div class="mcwidget-embed" data-widget-id="560782"></div>

Hope this helps.

Still did not work.

seems to be working now, did you guys do anything?

Hey There,

We didn’t do anything. It must be your browser cache.
If you need anything else we can help you with, don’t hesitate to open another thread.

Best Regards.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.