Code Working in Header but not in Theme Template | XM Community
Skip to main content
Question

Code Working in Header but not in Theme Template

  • February 22, 2025
  • 0 replies
  • 21 views

Forum|alt.badge.img+3

I have a JavaScript code in my header that switches between normal mode and custom dark mode using an embedded variable from the backend. The code works perfectly when I place the JS in the header and the CSS in the custom CSS section.

However, when I try to add the same JS and CSS code in the Theme tab with a template, it doesn’t work as expected. I'm unsure what the issue is, but it seems that the embedded data isn't being properly incorporated into the addOnLoad code that I added. Any help would be appreciated!

0 replies

Be the first to reply!

Leave a Reply