• Hi,

    I am not able to find much information on how to add js scripts in an FSE theme. I can add css in the “Additional CSS” section but where does one add js scripts? Are plugins like Code Snippets are the solution?

    I read somewhere that one has to put the script in a Custom HTML block. But that would mean one has to ensure that this Custom HTML block should be added across all templates if one has to have this across multiple types of pages/posts. And some suggest against this approach. How does a non-developer do this?

    Thanks.

Viewing 1 replies (of 1 total)
  • How does a non-developer do this?

    I’ll argue that, as a non-developer, using a plugin has always been and remains the best approach. Sure, you could add the code directly in Classic themes’ files — but what would happen if you update the theme? You’d lose everything.

Viewing 1 replies (of 1 total)

The topic ‘Where does one add javascript files in an FSE theme?’ is closed to new replies.