I’m getting this error when trying to enqeue script and styles:
This is the code in functions.php:
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function theme_enqueue_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'slik-slider-style', get_stylesheet_directory_uri() . '/js/slik/slick-theme.css' );
wp_enqueue_style( 'slik-slider-style-2', get_stylesheet_directory_uri() . '/js/slik/slick.css' );
}
function theme_enqueue_scripts(){
wp_enqueue_script( 'slik-slider-js', get_stylesheet_directory_uri() . '/js/slik/slick.min.js' );
}
add_action( 'wp_enqueue_scripts', 'theme_enqueue_scripts' );
The files are all in places, I have no idea why i’m getting this error…
Any help will be appreciated.
Thanks!
There are two things that I see.
First are the two missing css file in the javascript (/js/) folder or are they in a css (/css/) folder. If they are in that path great, if not change the paths to those files.
Second try the following
Hope this helps.
Best,
Tim