I tried to enqueue a module script in WordPress. But not enquiring the script on wordpress.
I have tried: wp_enqueue_script( ‘handle’, ‘https://unpkg.com/@google/model-viewer/dist/model-viewer.min.js’, [], 1.0.0 );
I tried to enqueue a module script in WordPress. But not enquiring the script on wordpress.
I have tried: wp_enqueue_script( ‘handle’, ‘https://unpkg.com/@google/model-viewer/dist/model-viewer.min.js’, [], 1.0.0 );
3
Answers
you can use it
you must register script first, then enqueuing.
For Details: https://developer.wordpress.org/reference/functions/wp_enqueue_script/