Loading child theme script after plugins scripts
The 3rd parameter of wp_enqueue_script(), called $deps, will help you to solve this. You just need to know the handle with which owl carousel was enqueued. Assuming it is owlcarousel, you’d change your code to this wp_enqueue_script( ‘custom-script’, get_stylesheet_directory_uri() . ‘/custom-script.js’, array(‘jquery’,’ultrabootstrap-bootstrap’,’ultrabootstrap-scripts’,’owlcarousel’) // added this new dependancy —————————————–^ ); This way, WordPress will do the … Read more