Title: Error when queuing function
Last modified: April 10, 2018

---

# Error when queuing function

 *  Resolved [Georgia Morrison](https://wordpress.org/support/users/gmorrison/)
 * (@gmorrison)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/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 :
 * > [http://mydomain.com/wp-content/themes/generatepress_child?ver=36fc32f4553b8dgs8c0c2b243d66de29](http://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!!
    -  This topic was modified 8 years, 1 month ago by [Georgia Morrison](https://wordpress.org/support/users/gmorrison/).

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Theme Author [Tom](https://wordpress.org/support/users/edge22/)
 * (@edge22)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/error-when-queuing-function/#post-10166248)
 * Hi there,
 * Did you get this working? The topic is set to resolved.
 * Let me know 🙂
 *  Thread Starter [Georgia Morrison](https://wordpress.org/support/users/gmorrison/)
 * (@gmorrison)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/error-when-queuing-function/#post-10170507)
 * 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](https://wordpress.org/support/users/edge22/)
 * (@edge22)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/error-when-queuing-function/#post-10172400)
 * 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.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/generatepress/3.6.1/screenshot.
   png)
 * GeneratePress
 * [Support Threads](https://wordpress.org/support/theme/generatepress/)
 * [Active Topics](https://wordpress.org/support/theme/generatepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/generatepress/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/generatepress/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Tom](https://wordpress.org/support/users/edge22/)
 * Last activity: [8 years, 1 month ago](https://wordpress.org/support/topic/error-when-queuing-function/#post-10172400)
 * Status: resolved