WordPress Problem with wp_enqueue_script
Posted
by Zack
on Stack Overflow
See other posts from Stack Overflow
or by Zack
Published on 2010-03-25T08:53:01Z
Indexed on
2010/03/25
9:03 UTC
Read the original article
Hit count: 330
Wordpress
|JavaScript
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 automatically, I guess this is the reason, how can I fix it.
© Stack Overflow or respective owner