Loading jQuery & javascript in footer
-
Hi, I would like to load the bundled jQuery and my other javascript files in the footer. I put the following code in my functions.php and it loaded the javascript files in the footer via the wp_footer() hook. Is this the right way? Will it cause conflicts with plugins?
function load_javascript_files () { wp_enqueue_script( 'jquery' ); wp_enqueue_script( 'bootstrap-js', get_template_directory_uri() . '/js/bootstrap.min.js' ); } add_action( 'wp_footer', 'load_javascript_files' );
The topic ‘Loading jQuery & javascript in footer’ is closed to new replies.