Code placement for loading in specific page
-
I have an “include” that loads a PHP script that contains some enqueues. I originally put my ‘include’ in the top of my template for the page but I found that the code didn’t get loaded because it looks like “template load” time is too late in the load sequence. I moved the ‘include’ to my functions.php and all works fine BUT I don’t want to load all of this code for all pages—which is what happens with the ‘include’ in functions.php. BUT, I discovered that in functions.php I don’t know what the page is that is being loaded.
Any ideas?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Code placement for loading in specific page’ is closed to new replies.