Conditionally load scripts?
-
3 JS files are being loaded on every page of the site. I see in like 90 of class-greenhouse-job-board-public.php the
enqueue_scripts
function. Is there a way to check to see if the shortcode is being used and then load the 3 dependent scripts if that returnstrue
?I found this Jedi way of doing it but not sure how it would hook into this plugin: https://scribu.net/wordpress/optimal-script-loading.html
Any ideas? Thanks!
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Conditionally load scripts?’ is closed to new replies.