Title: Problem with wp_enqueue_script
Last modified: August 19, 2016

---

# Problem with wp_enqueue_script

 *  [wordpressthemes](https://wordpress.org/support/users/zacklive/)
 * (@zacklive)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/problem-with-wp_enqueue_script/)
 * I try to us wp_enqueue_script to load my javascript, here is my code:
 * `<?php wp_enqueue_script('slider','/wp-content/themes/less/js/slider.js',array('
   jquery'),'1.0'); ?>`
 * It’s not working, when I look into the source, it turns to be:
    `<script type
   ='text/javascript' src='http://localhost/wp/wp-content/themes/less/js/slider.
   js?ver=2.9.2'></script>`
 * ?ver=2.9.2 is added to the end, I guess this is the reason, how can I fix it.

Viewing 1 replies (of 1 total)

 *  Thread Starter [wordpressthemes](https://wordpress.org/support/users/zacklive/)
 * (@zacklive)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/problem-with-wp_enqueue_script/#post-1438933)
 * I fixed it by adding ?ver=2.9.2 to wp_enqueue_script:
 * `<?php wp_enqueue_script('slider','/wp-content/themes/less/js/slider.js?ver=2.9.2',
   array('jquery'),'1.0'); ?>`

Viewing 1 replies (of 1 total)

The topic ‘Problem with wp_enqueue_script’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [wordpressthemes](https://wordpress.org/support/users/zacklive/)
 * Last activity: [16 years, 1 month ago](https://wordpress.org/support/topic/problem-with-wp_enqueue_script/#post-1438933)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
