Home>Support>Javascript doesn’t work in SiteOriginHero

Javascript doesn’t work in SiteOriginHero

Notice: This thread is over two years old; the information may be outdated. Please consider creating a new thread if you require free support. If you have an active SiteOrigin Premium license, you can email our premium support desk at [email protected].

Hi!

I’m experiencing such problem – when I copy a line of Javascript in a SiteOriginHero widget on my WordPress page, it doesn’t work.
If I copy the same Javascript in SiteOriginEditor widget on the same page, the script works.

What could be the issue why can’t I get Javascript working inside the SiteOriginHero row?

Thanks!

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 6 years, 8 months ago Alex S
    Hi, I Work Here

    Hi Anete,

    We’re not too sure why the JavaScript is getting filtered, but it’s strongly recommended that you don’t add JavaScript to any instance of TinyMCE (SiteOrigin Hero, SiteOrigin Editor, etc) as TinyMCE will remove the JavaScript if you change content mode.

    Please add the JavaScript to a Custom HTML widget or if it has to be added to the slider, please add it to a SiteOrigin Layout Slider widget with a Custom HTML added to the relevant slide.

  2. 6 years, 8 months ago Anete Ilmete

    Hi Alex,

    Thank you for the reply.

    I took your advice and added the Javascript line into a Custom HTML widget on the page. It works great to trigger the command of a function in a SiteOriginEditor row on the same Page.

    However, I still can’t figure out why the same Javascript placed in Custom HTML widget doesn’t work in the function I need it to trigger is located in the SiteOriginHero widget.

    The Javascript I’m talking about is to embed the Convertkit form. So I can’t believe it doesn’t ever work for SiteOriginHero.

    I build the first row of my page using SiteOriginHero widget and included the button that calls the Convertkit form to pop up. The Javascript apparently is not applied to it. But if I copy the same content from SiteOriginHero to SiteOriginEditor it suddenly works.

    Maybe there’s something you can point out that I might be doing wrong regarding the SiteOriginHero?

    Thanks!

  3. 6 years, 8 months ago Alex S
    Hi, I Work Here

    Hi Anete,

    Do you have a public URL where we can take a look at what’s going on?

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More