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 trial

WordPress WordPress Theme Development Building Out WordPress Navigation The wp_nav_menu Function

Jerôme Naglé
Jerôme Naglé
14,189 Points

Errors in the nav menu

Hi.

I did everything exactly the same as in the videos but my menu is nog opening. I get 3 ( GET errors for all the JS files).

Even if I paste your final-theme that I downloaded in my localhost the theme isn't loading.

Please help

2 Answers

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

Can you post the specific errors you're getting please

Zach Elkins
Zach Elkins
9,602 Points

EDIT: Figured it out, it was a matter of missing a ',' behind the 'primary-menu' part of this:

<?php

    $defaults= array(
        'container' => false,
        'theme_location' => 'primary-menu',
        'menu_class' => 'no-bullet'
    );

    wp_nav_menu( $defaults );

  ?>

I believe I'm getting the exact same issue. I am getting a completely blank page only when trying to load the theme that is being worked on. I tried using developer tools to see if the code was showing up and there is nothing at all there. I've rewatched a number of the videos just to make sure I had exactly what the videos are showing, and it is the same.

The other default themes that you get through Wordpress work perfectly fine, but this one is not.

Using view source shows a totally blank page starting from line 1 and the sources in the developer tools show

localhost > localwp.com/wordpress > (index)

Which is the only information I can get from the page aside from when I go to Console I get:

"Failed to load resource: the server responded with a status of 500 (Internal Server Error)"

Which made me to think it has to do with MAMP? I tried restarting the server and nothing changed. So at this point I'm really stuck and can't figure out what could be the problem after trying to troubleshoot it myself.

Jerôme Naglé
Jerôme Naglé
14,189 Points

Maybe you also need to upload your files to a real server instead of localhost.

Jerôme Naglé

Zach Elkins
Zach Elkins
9,602 Points

I'm working with my own database and a local server so I don't have to make all the edits to the live site. Hasn't given me problems before, and considering how many people work the same way I don't fully see the need to move all the files to a live server until I am done with them and they are ready to launch.

But if you mean specifically to test their functionality and see if the problem only occurred in local, I tried that and the same exact issue happened at the time as well.