enqueue scripts
-
Hello ,
I am trying to enqueue script , So i created js with code
alert("sometext");
& added this in functions.phpfunction virtue_scripts() { wp_enqueue_script( 'testjava', get_template_directory_uri() . '/wp-content/themes/virtue/testjava.js', array(), '1.0.0', false ); } add_action( 'wp_enqueue_scripts', 'virtue_scripts' );
But its not working ,
When i add it through headers.php , it works perfectly.
Where am i going wrong?
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘enqueue scripts’ is closed to new replies.