question about wp_enqueue_script
-
Is there a way to specify which scripts should load on which page using the enqueue script function? I noticed that conditional tags like is_home() or is_page() doesn’t get called when calling on the action hook ‘init’. I’m trying to avoid called the script manually, ex
echo "<script scr='myscript.js'></script>";Since it has a chance of breaking some plugins. Is it possible to use something like query vars to determine which page I’m on in order to use wp_enqueue_script()?PS: I have $infooter = true on the wp_enqueue_script() arguments.
Thanks
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
The topic ‘question about wp_enqueue_script’ is closed to new replies.