Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

ernestinembak
272 PointsJS not loading
what am I doing wrong?
function imk_scripts() { wp_enqueue_script( 'bootstrap_js', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'), '3.3.5', true ); wp_enqueue_script( 'plugin_js', get_template_directory_uri() . '/js/plugins.js', array(''), '1.0', true ); wp_enqueue_script( 'bskit_js', get_template_directory_uri() . '/js/bskit-scripts.js', array(''), '1.0', true ); }
add_action( 'wp_enqueue_scripts', 'imk_scripts' );

ernestinembak
272 PointsHere the mistake : there were no script dependencies, so I had to declare empty array: array(), rather than array('').
The correct code is:
function imk_scripts() { wp_enqueue_script( 'bootstrap_js', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'), '3.3.5', true ); wp_enqueue_script( 'plugin_js', get_template_directory_uri() . '/js/plugins.js', array(), '1.0', true ); wp_enqueue_script( 'bskit_js', get_template_directory_uri() . '/js/bskit-scripts.js', array(), '1.0', true ); } add_action( 'wp_enqueue_scripts', 'imk_scripts'
Michael Peterman
19,087 PointsMichael Peterman
19,087 PointsHey man, that a little weird. I compared your code with what I usually use and it looks like it should be working. Are you getting any errors in the console (if you right click and go to Inspect Element > Console ) - any 404s?