enqueue_custom_scripts is not working at all

[ad_1]

Hello community!
I’m trying to load Lottie’s library CDN and my custom script, but as I see in my browser’s network tab, no js is loading.
No errors in debug.logneitherr. This is my code:

`function enqueue_custom_scripts() {`
`// Enqueue Lottie library`
`wp_enqueue_script(‘lottie-library’, ‘https://cdn.jsdelivr.net/npm/lottie-web@latest’, array(), null, true);`
`// Enqueue your custom script`
`wp_enqueue_script(‘flower-animation’, get_template_directory_uri() . ‘/js/flower-animation.js’, array(‘lottie-library’), null, true);`
`// Localize the script with new data`
`wp_localize_script(‘flower-animation’, ‘theme_vars’, array(`
`’template_directory_uri’ => get_template_directory_uri(),`
`));`
`}`
`add_action(‘wp_enqueue_scripts’, ‘enqueue_custom_scripts’);`
The rest of my functions.php’s enqueuing is working just fine.

Help!!!

[ad_2]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer