Add a second functions.php or insert functions into custom single template?
-
I would like to add javascript to a single post custom template (doing the single post template, etc, is already done).
I don’t want to add javascript to my functions because I don’t want to add it to the page load. My site doesn’t use javascript in general.
However, I want to display some javascript (an API for a type of Google Map tracker) on one of my posts. I don’t know how to do this, and I’ve tried various ways.
I think I need to add javascript in a js folder and load it, but I would like to know how to either A) load it right from my custom single page without adding it to a functions.php at all, or B) on my custom single, load a secondary functions.php and load my javascript though that.
If anyone has an even better solution, I’m open to that, too (trying to avoid plugins though as much as possible).
Thanks
- The topic ‘Add a second functions.php or insert functions into custom single template?’ is closed to new replies.