marko krstić

Collections

Archives

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.

Let's Connect

Feel free to reach out for collaborations or just a friendly hello ?
[email protected]
linkedininstagramdribbblefacebook-official