Local Host JavaScript now working
-
I have included the following codes,
<?php wp_enqueue_script(“jquery”); ?>
<?php wp_head(); ?>in header.php
————————————
<?php wp_footer(); ?>
in footer.php and
————————————<?php
function wpbootstrap_scripts()
{
wp_enqueue_script( ‘application’, get_template_directory_uri() . ‘/js/application.js’ );
wp_enqueue_script( ‘bootstrap-collapse’, get_template_directory_uri() . ‘/js/bootstrap-collapse.js’ );
wp_enqueue_script( ‘bootstrap-tab’, get_template_directory_uri() . ‘/js/bootstrap-tab.js’ );
wp_enqueue_script( ‘bootstrap-transition’, get_template_directory_uri() . ‘/js/bootstrap-transition.js’ );
wp_enqueue_script( ‘bootstrap.min’, get_template_directory_uri() . ‘/js/bootstrap.min.js’ );
wp_enqueue_script( ‘owl.carousel’, get_template_directory_uri() . ‘/js/owl.carousel.js’ );
wp_enqueue_script( ‘script’, get_template_directory_uri() . ‘/js/script.js’ );
}
add_action( ‘wp_enqueue_scripts’, ‘wpbootstrap_scripts’ );?>
—————————————————–
the javascript files are located in a folder called js which is located where header.php is. I don’t understand why this is not working.Any help will be much appreciated, thank you
- The topic ‘Local Host JavaScript now working’ is closed to new replies.