Enqueue CSS and scripts only when required
-
Hello,
Thanks for making such a great weather plugin.
I noticed that the CSS and javascript files are enqueued across my whole site and not just the pages where the weather shortcode is used. For performance reasons, I’d prefer the scripts to be enqueued only where necessary.
Is it possible to add the enqueue_script/enqueue_style to the shortcode, rather than loading it globally across the whole site?
Thanks!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Enqueue CSS and scripts only when required’ is closed to new replies.