Error when queuing function
-
I insert this code in GP’s child theme function.php:
function LoadSlickOnHomePage() {
if (is_page(3347)) {
wp_enqueue_script( ‘load_Slick_frontend_js’, plugins_url(‘elementor/assets/lib/slick/slick.min.js’), array(‘jquery’), ”, true );
wp_enqueue_style( ‘load_Slick_frontend_css’, get_stylesheet_directory_uri(‘/slick/slick.css’) );
wp_enqueue_style( ‘load_Slick_frontendtheme_css’, get_stylesheet_directory_uri(‘/slick/slick-theme.css’) );
}
}add_action(‘wp_enqueue_scripts’, ‘LoadSlickOnHomePage’);
While the JS file does load, the 2 CSS files don’t get loaded because the browser makes a call to :
https://mydomain.com/wp-content/themes/generatepress_child?ver=36fc32f4553b8dgs8c0c2b243d66de29
Reason is 403 forbidden, no directory listing.
Shouldn’t the call be made instead to style.css ?
Please help, thanks!!
- The topic ‘Error when queuing function’ is closed to new replies.