Enqueuing same script loaded by plugin and in the theme

Hi,

If you want to enqueue script you can use wp_enqueue_script function.

That’s the right way

Thank you

Okey but how should I figure if the plugin has the script enqueued and under what name? so that I’m not enqueuing a script already enqueued?

This plugin should have support try to contact them they would be better to tell you.

If you enqueue using the same handle that the plugin does, WP will only load the file into the page once even if the same script were enqueued 20 different times. Assuming of course the plugin is also enqueuing its scripts. If you are unable to determine the right handle, Zworthkey provided the best suggestion.

Alright thanks to both, will do so 😉



Source link