2022-11-21, 03:23:18
(2022-11-21, 01:20:19)johnywhy Wrote:(2022-11-20, 20:19:23)Felix Wrote: No need for add-on
Just use php include in the <head> section
or just before the </body> tag
In which file?
Browse to your theme that you would like to update.
For example "\theme\Innovation\"
In this example, we will add it to the file "footer.inc.php"
Change lines 24-27 from:
Code:
</footer>
</body>
</html>
to:
Code:
</footer>
<script src="<?php get_theme_url(); ?>/assets/js/myscripts.js"></script>
</body>
</html>
And make sure you have saved your new "myscripts.js" file info folder "\theme\Innovation\assets\js"
You can adapt this method to whichever theme you are using.