I am trying to enqueue a script in my WordPress function.php
I cant seem to get it to pick up the script.
works in this format if include in header
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
however when i include in functions.php it dose not work
wp_enqueue_script('bootstrap-js', 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js', array(), '3.3.6', true);
can anyone see why it will not work when I enqueue it ?
FULL CODE
function theme_js()
{
wp_enqueue_script('jquery-js', 'https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js', array(), '3.1.1', true);
wp_enqueue_script('bootstrap-js', 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js', array(), '3.3.6', true);
wp_enqueue_script('html5shiv-js', 'https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js', array('jquery'), '3.7.2', true);
wp_enqueue_script('respond-js', 'https://oss.maxcdn.com/respond/1.4.2/respond.min.js', array('jquery'), '1.4.2', true);
wp_enqueue_script('custom', get_template_directory_uri() . '/js/custom.js', array(), null, true);
}
add_action('wp_enqueue_scripts', 'theme_js');