Title: can&#8217;t enqueue child theme script
Last modified: February 22, 2018

---

# can’t enqueue child theme script

 *  [stevedoig](https://wordpress.org/support/users/stevedoig/)
 * (@stevedoig)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/cant-enqueue-child-theme-script/)
 * Hi Folks,
 * We’re using a Divi child theme.
 * In the child theme’s functions.php, we have:
 *     ```
       function sit_divi_scripts() {
           wp_enqueue_script( 'gtm', get_stylesheet_directory_uri() . '/js/gtm.js', array(), '1.0.0', true );
       }
       add_action( 'wp_enqueue_scripts', 'sit_divi_scripts' );
       ```
   
 * This fails to load the `<script>` tag on the front-end.
 * When I use:
 *  `wp_enqueue_script( 'gtm', get_template_directory_uri() ...`
 * the front end will load the `<script>` tag but it points to the parent theme 
   directory, which is not where the script lives.
 * Help appreciated.

Viewing 1 replies (of 1 total)

 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [8 years, 3 months ago](https://wordpress.org/support/topic/cant-enqueue-child-theme-script/#post-10002486)
 * If you’re using the Divi theme then you need to avail yourself of their support.
 * [https://www.elegantthemes.com/forum/](https://www.elegantthemes.com/forum/)
 * For pro or commercial product support please contact the author directly on their
   site. This includes any pre-sales topics as well.
 * As the author is aware, commercial products are [not supported in these forums](https://wordpress.org/support/guidelines/#do-not-post-about-commercial-products).
   I am sure they will have no problem supporting you there.

Viewing 1 replies (of 1 total)

The topic ‘can’t enqueue child theme script’ is closed to new replies.

## Tags

 * [wp_enqueue_script](https://wordpress.org/support/topic-tag/wp_enqueue_script/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * Last activity: [8 years, 3 months ago](https://wordpress.org/support/topic/cant-enqueue-child-theme-script/#post-10002486)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
