I have a wordpress powered site and my header is contained in the file header.php. On a different page I would like to run a script, which is only needed on that page.
The script should be loaded in the header of this page, but this page only. Including the script in the header.php would load the script on every other page.
How would I best include the script in the page-pageslug.php template?
In your
header.phpabovewp_head();, usepage-slugis then the slug of the page you wish to target.wp_enqueue_script():