4.8.1 enqueue script version problem
-
Hi guys,
since updating to 4.8.1 I am having a problem with my enqueued scripts. This is how I try to load isotope script in a custom plugin:
function isotope_plugin() { wp_enqueue_script('isotope', 'https://unpkg.com/[email protected]/dist/isotope.pkgd.js', array('jquery'), false, false); } add_action( 'wp_enqueue_scripts', 'isotope_plugin' );
However I get an error because the script can’t be found. I checked and this is because my current WordPress version 4.8.1 gets added to the script src so that it reads “https://unpkg.com/[email protected]/dist/isotope.pkgd.js?ver=4.8.1”. That is although I specifically asked to add no version number. The same happens if I just define the handle and the src like so
function isotope_plugin() { wp_enqueue_script('isotope', 'https://unpkg.com/[email protected]/dist/isotope.pkgd.js'); } add_action( 'wp_enqueue_scripts', 'isotope_plugin' );
I can’t seem to get rid of the Worpdress version number.
This happens with all scripts I enqueue through this plugin.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘4.8.1 enqueue script version problem’ is closed to new replies.