I am trying to add bootstrap js script to my WordPress theme as "correct", but I do not see the link to the js file in the header section of the web page at startup. I tried adding it to the WordPress theme title as “correct,” but no luck. Now I am trying in a file functions.phpand still no luck.
function buns_bootstrap_run(){
wp_register_script('bootstrap-js', get_stylesheet_directory() . '/js/bootstrap.min.js', array('jquery'),'3.2.0', false);
wp_enqueue_script('bootstrap-js');
}
add_action('wp_enqueue_script', 'buns_bootstrap_run');
source
share