Deprecated: Function seems_utf8 is deprecated since version 6.9.0! Use wp_is_valid_utf8() instead. in /home/dplugins-code/htdocs/code.dplugins.com/wp-includes/functions.php on line 6131

Deprecated: Function seems_utf8 is deprecated since version 6.9.0! Use wp_is_valid_utf8() instead. in /home/dplugins-code/htdocs/code.dplugins.com/wp-includes/functions.php on line 6131
Load script only when you need it – Code DPlugins

Load script only when you need it

In code block when you are using script add to PHP tab:

<?php 
	wp_enqueue_script( 'magic-grid', '/wp-content/plugins/_NZP_Devs-Toolbox/node_modules/magic-grid/dist/magic-grid.min.js', '', '1.0.0', true );
?>	

You need to put path from /wp-content/ and not just plugins folder

PHP

JavaScript

Note: Got this trick from a good friend Alexander Buzmakov.
Visit his tutorials oxywp.com.

Click to Copy