Archived topic
Cant embed script on pages
5 replies · Started by Jaytech on November 6, 2019
Hello
I am having some issues trying to embed some code to my website pages. It will not allow me to embed the script into the pages and save. It will preview it but just gives an error on save. Its an ordering menu from a 3rd party. I never had any issues with this until I switch to this theme.
Thanks!
Hi there,
How are you embedding the script?
Does it work normally if you switch to a twenty series WP theme temporarily?
Yes, this works no problem with any other theme.
How are you embedding the script?
Can you link me to the page in question?
What is the best way to add it to each page? Its just a simple widget like this:
<script src="https://www.sample.com/public/global/js/themanager/embed.js"></script>
<script>var pymParent = pym.Parent('the-menu', 'https://www.example.com/embed/menu2/the-town', {});</script>
Thanks!
Try using wp_footer hook:
https://docs.generatepress.com/article/hooks-element-overview/