Home › Forums › Support › Best way to add 'Javascript' to a page (embedding)? This topic has 8 replies, 2 voices, and was last updated 3 years, 12 months ago by Leo. Viewing 9 posts - 1 through 9 (of 9 total) Author Posts April 3, 2020 at 1:59 pm #1225578 Andy Hi there, I have a short form that I usually embed on my landing pages (made with Javascript). Looks similar to this: <script type="text/javascript"> /* Short Form */ var test = { "name": { "email": "" }, </script> <script src="//test.com/js/serve.js"></script> How should I embed a code like this on my landing page? Should I use the Classic editor? I don’t want to run into any issues. Thank you, Andy April 3, 2020 at 2:57 pm #1225614 LeoStaff Customer Support Hi there, That can usually go into wp_footer hook using a hook element: https://docs.generatepress.com/article/hooks-element-overview/ April 3, 2020 at 3:17 pm #1225633 Andy Just clarifying, this isn’t a pop-up though. I’m embedding a single form on 1 page. Similar to embedding a youtube video with iframe. Do I still need to use hooks? Thank you April 3, 2020 at 4:22 pm #1225664 LeoStaff Customer Support Maybe try the Classic block? If not then just go with the classic editor. April 3, 2020 at 4:40 pm #1225676 Andy Thanks! April 3, 2020 at 5:05 pm #1225691 Andy Actually Leo, I’m having issues using the Classic block. In a previous theme, I was able to add javascript code to my page with a javascript block. Is there any way to add a javascript block like this? View post on imgur.com April 3, 2020 at 5:31 pm #1225700 LeoStaff Customer Support There isn’t a javascript block from Gutenberg. Maybe try the HTML block? April 3, 2020 at 5:35 pm #1225705 Andy I think that worked, thank you. I’ll test it out. April 3, 2020 at 5:36 pm #1225707 LeoStaff Customer Support No problem 🙂 Author Posts Viewing 9 posts - 1 through 9 (of 9 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In