Member
Member
Roland   16-04-2026, 08:03
#1

Hello !
I'm considering adding swup.js to the theme Collections.

I notice that the plugin's javascript is systematically integrated from the home page. Never on demand. Which is a good thing for me. Do you confirm?

Thanks for your help !

Administrator
Administrator
acrylian   16-04-2026, 08:24
#2

Generally it is up to you how and where you include what. You can or have to include js on any theme page where it is needed.

Generally it is a good idea to have a global inc-header.php/header.php file that is included on every theme page to load js/css files so you don't have to do it individually. I don't remember how you do it in Collections.

Also a good idea is to use the "theme_head" filter to include js/css . Especially if you want to override styles that plugins serve you need to make sure your theme styles load as the last. (the recommend way how to load js/css that might/will probably change in the future but that is in the future…)

Administrator
Administrator
acrylian   16-04-2026, 08:55
#3

As I never heard of swup.js before I took a look. Sounds interesting.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.