Home Forums Weaver Xtreme Theme Can I add Javascript to the Sidebar?

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #67000
    Celanna
    Participant

    I have a client with an old website she’s decided to start updating again and I have run into an issue with the sidebar. She uses Infusionsoft for her opt-ins and has been getting a lot of spam signups since site updates have begun, specifically from an Infusionsoft form on her sidebar that is currently linked via HTML. After speaking with IFS tech support, they have advised changing all of her forms to be linked using Javascript but I don’t see a sidebar widget that will allow me to use the JS. The site currently has the sidebar opt-in linked via HTML until I can resolve the Javascript issue.

    Her website is here: https://www.debralmorrison.com/debra-as-a-speaker

    I recently updated her site to WordPress 5.6 and she has Weaver XTreme 4, Weaver Xtreme Theme Support version 4.4.1, and Weaver Show Posts 1.5.1.

    Thanks in advance.

    #67001
    Weaver
    Keymaster

    If IFS tech support suggested adding Javascript, you should ask the how to do that for widgets. As far as I know, WordPress requires all widgets to disallow Javascript for security reasons – allowing JS in widgets is an open door for hacking.

    #67002
    Celanna
    Participant

    It’s not the issue of Javascript and Infusionsoft… it’s where my client wants to put it. She’s always had a sidebar signup in the past and we just used the HTML code. When she started getting the spam signups Infusionsoft recommended moving to Javascript saying it’s less prone to spam signups than the regular HTML and that they’ve been told that fixes the spambot activity by other customers with similar issues. Since Infusionsoft reps aren’t web designers, they can’t/won’t give any other advice.

    #67003
    scrambler
    Moderator

    Have you tried to use a Custom HTML widget and insert the script inside the script tagsĀ  like below?

    <script language="javascript">
    
    your script
    
    </script>
    #67004
    Celanna
    Participant

    Unfortunately, that didn’t work either. I’d also thought using the HTML widget would recognize the JS if I “forced” it to read the script language. Thanks for the input everyone! I think my client is about to realize she’s better off just redoing the website rather than putting bandaids everywhere and expecting the site to work.

    #67008
    Weaver
    Keymaster

    WP does not allow JS in the Custom HTML widget. No way around that.

     

    #67009
    Weaver
    Keymaster

    I guess I was wrong about this. Both the HTML widget and the Text Widget in Text mode allow scripts.

    And using Visual Editor mode (or block editor) seems to break scripts.
Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.