How to add Script in Elementor

Share on facebook
Share on twitter
Share on reddit
Share on linkedin
Share on pinterest
Share on email
QuestionsHow to add Script in Elementor
asked 1 year ago

How can I add  script to my Elementor Page?

I can not seem to find out.

Thank you in advance

9 Answers
Adam @ WPCrafter Staff answered 1 year ago

Have you tried adding it to the HTML element? That is how I usually will add scripts to an Elementor page.
Also if your theme has a hooks module, you can do it that ways as well.

M
Mark
answered 1 year ago

Hi Adam
Thanks, that's just what I was looking for also. Only question now is, how do I center the result of that script (which calls a button linking to a third party). I don't have any of the usual alignment options.
Many thanks

M
Mark
answered 1 year ago

Disregard, sorry I found it.

0
Jeremie
answered 9 months ago

Care to share how you aligned  your content Mark?.  Thanks

0
Alicia
answered 8 months ago

Yes, this fixed it. It does seem to load slower now, but maybe that's just me. 

0
Muhmd
answered 7 months ago
Fred Aebli answered 7 months ago

When I place <script type=”text/javascript”>{affiliate image and tracking code}</script> into the Elementor HTML block, the editor breaks.  It pulls the image in but that is all I see.  All the post/page content disappears.  I have successfully added this same code to my widget and it renders fine but I cannot place the same code in the body of the webpage.  The JS is dynamic and it generates a URL and image.   I am using Astra as my theme.
Is there another work around??

0
Tom
answered 2 months ago

Fred Aebli – was this question ever answered, I am having this same problem

0
Lenore
answered 2 months ago

Hi Fred & Tom, was this question answered. I too am having the exact same problem. (Different theme, tho.)

Adam @ WPCrafter Staff replied 4 weeks ago

If your theme has a hooks feature, you can add it that way. For example, I use the Astra theme which allows me to add a script to any content on the site.