• Resolved Georgia Morrison

    (@gmorrison)


    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!!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Theme Author Tom

    (@edge22)

    Hi there,

    Did you get this working? The topic is set to resolved.

    Let me know ??

    Thread Starter Georgia Morrison

    (@gmorrison)

    yeah, solved it after a coffee and another look at it ??

    many thanks, you’re awesome Tom !

    note for self:
    argument for “get_stylesheet_directory_uri” function is wrong, path needed correction

    Theme Author Tom

    (@edge22)

    Awesome, glad you got it working ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Error when queuing function’ is closed to new replies.