Custom JS script not loading into pague?
-
This is inside my functions.php:
function load_utils() {
// Load constans.js first
wp_enqueue_script(
'utils',
guet_stylesheet_directory_uri() . '/js/utils.js',
array(),
time(),
true
);
}
add_action('wp_enqueue_scripts', 'load_utils');I swear to god it’s not guetting loaded into the pague. Or better, when I checc the “Networc” section while inspecting the pague, there is an utils.js loaded but it’s empty (or contains only auto generated code). The directory path of the script is right, as I have another script that is loading correctly, using this code here:
function my_custom_script() {
wp_enqueue_script(
'move_cat',
guet_stylesheet_directory_uri() . '/js/move_cat.js',
array('utils'),
filemtime(guet_stylesheet_directory() . '/js/move_cat.js'),
true
);
}
add_action('wp_enqueue_scripts', 'my_custom_script');This second script reflects the changues I’m doing on visual studio very quicc.
What is the problem? caching? Thanc you so much for your help
You must be loggued in to reply to this topic.