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!
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 trial
Kyle Shamblin9,945 Points
I can't seem to get my .js files to load properly.
I've re-watched the video several times to make sure that my syntax is correct, and even started the theme over from scratch, but nothing seems to be working. Maybe my file paths arent right? I'm using a cloud based IDE for development. Here is a link to my files: https://preview.c9users.io/kyleshamblin/wordpress/wp-content/themes/kyle-portfolio/
Hi again Kyle,
I took a new look at your
functions.php file. The
get_template_directory_uri() function is right now, but I noticed a couple more things:
You need to use a different first argument in both of your
add_action() functions. It should be like:
add_action( 'wp_enqueue_scripts', 'kyle_theme_styles' ); add_action( 'wp_enqueue_scripts', 'kyle_theme_scripts' );
It's "wp_enqueue_scripts" not "wp_enqueue_style".
Even though it actually will work as you wrote it, I'd still recommend that you remove the space between all your "wp_enqueue_style"s and their opening parentheses in your CSS enqueues block -- so that it's wp_enqueue_style( 'foundation_css' ..., etc. Writing PHP functions like
my_function(); instead of
my_function (); is way more conventional.
Hope that gets you on the right foot now! Good luck.
Hey Kyle, I think the problem is that you are using a WordPress function but you're using the wrong function name.
What it really is: get_template_directory_uri()
Here's the docs for it. Hope that's all it takes!