Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialEran Greenwald
529 PointsJava script wont load
Hello. The flex slider is not loading in the home page footer. I followed the exact instructions. What can be the problem?
Thank you, Eran.
2 Answers
Andrew McCormick
17,730 Pointsplease copy and paste in your related code
Eran Greenwald
529 PointsHello. This is my code:
//Loading Theme JS files function theme_js(){ wp_register_script( 'flexslider', get_template_directory_uri() . '/js/flexslider.js', array( 'jquery' ), '', true ); if( is_page( 'home' ) ){ wp_enqueue_script( 'flexslider' ); } } add_action( 'wp_enqueue_scripts', 'theme_js' );
It isn't loading in the home page.
Thank you.