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 trialBryan Haire
2,971 Pointsnav button not loading
when i click the nav button at the top right like in the video i get this: Failed to load resource: the server responded with a status of 404 (Not Found) icon-youtube.png:1 Failed to load resource: the server responded with a status of 404 (Not Found) icon-octocat.png:1 Failed to load resource: the server responded with a status of 404 (Not Found) icon-linkedin.png:1 Failed to load resource: the server responded with a status of 404 (Not Found) icon-email.png:1 Failed to load resource: the server responded with a status of 404 (Not Found) icon-flickr.png:1 Failed to load resource: the server responded with a status of 404 (Not Found) icon-twitter.png:1 Failed to load resource: the server responded with a status of 404 (Not Found) icon-vimeo.png:1 Failed to load resource: the server responded with a status of 404 (Not Found) icon-facebook.png:1 Failed to load resource: the server responded with a status of 404 (Not Found)
3 Answers
Wiktor Bednarz
18,647 PointsAs for an answer, the problem with navigation might be due to some errors with your functions.php file. I'd suggest going through all of the script calling functions there and double-check if they're correct. Your functions.php file should look something like that:
<?php
function wpt_theme_styles() {
wp_enqueue_style( "foundation_css", get_template_directory_uri() . "/css/foundation.css" );
//wp_enqueue_style( "normalize_css", get_template_directory_uri() . "/css/normalize.css" );
wp_enqueue_style( "google_css", "http://fonts.googleapis.com/css?family=Asap:400,700,400italic,700italic" );
wp_enqueue_style( "main_css", get_template_directory_uri() . "/style.css" );
}
add_action( "wp_enqueue_scripts", "wpt_theme_styles");
function wpt_theme_js() {
wp_enqueue_script( "modernizr_js", get_template_directory_uri() . "/js/modernizr.js", "", "", false);
wp_enqueue_script( "foundation_min_js", get_template_directory_uri() . "/js/foundation.min.js", array("jquery"), "", true);
wp_enqueue_script( "main_js", get_template_directory_uri() . "/js/app.js", array("jquery", "foundation_min_js"), "", true);
}
add_action( "wp_enqueue_scripts", "wpt_theme_js");
?>
If this won't solve the problem, then try checking if you've copied the right .js files from the static site folder provided at the start of the course.
Bryan Haire
2,971 Pointsthanks you were right and it loads now. idk why when i view my page i get a notice under the wordpress admin bar saying class="home page-template-default page page-id-9 logged-in admin-bar no-customize-support"
Bryan Haire
2,971 Pointsand just fixed what that was...i didnt put the php IN the body tag like so <body <?php body_class(); ?>> i instead put like this <body> then php
Wiktor Bednarz
18,647 PointsWiktor Bednarz
18,647 PointsHey there,
it seems like the errors that your browser is catching are related to the fact that you're trying to use non-existing assets. The only place those assets are called is in the footer of the static page, so I guess that your footer.php in your theme folder looks something like that:
So in other words the errors you've provided are not related to the nav button, but to the footer trying to call in on non-existing assets. Delete the whole <ul> element from your footer.php and the errors should disappear.