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 trialAlfredo Prince
6,175 PointsMy menu isn't displaying at all. Any ideas?
When I click on my menu button it looks to just refresh the page.
4 Answers
Alfredo Prince
6,175 PointsPrimary. I think it might be a js issue because I can see the menu items in inspector.
Jacob Mishkin
23,118 Pointsis their an error in the console? and in your backend, do you have your nav set up?
oh and is this a custom theme or a child?
David Powell
1,268 PointsTo fix the page refresh issue I had to do add onclick="return false;" in the link tag.
example (line 13 in header.php):
<a href="" class="nav-toggle" onclick="return false;"><span></span>Menu</a>
I tried putting return false in the app.js file like some ppl suggested, but it didn't fix the problem for me.
Jacob Mishkin
23,118 PointsYou do not need inline Js in the anchor tag. Are you enqueueing your menu in functions.php? Then in the backend setting the correct pages and menu?
Nata Vacheishvili
Courses Plus Student 9,594 PointsIs there anyone who fixed this issue? I am seeing the correct output of menu when I am inspecting the website: Home, Portfolio, About and Contact Us. I know its JS issue, because when I click nothing pops up. The foundation.min.js is linked properly no errors are showing. There us return false already in my app.js file and I did try to put it in anchor tag as well, but didn't work for me. If you have any suggestions that would be greatly appreciated!
Jacob Mishkin
23,118 Pointsis this your primary nav, or a custom nav? if no nav is showing is it registered?
Devon Pelletier
9,255 PointsDevon Pelletier
9,255 PointsI'm also having this issue. Page refreshes on menu click, on every page. No errors in the console, menu is set up as Primary Menu, and I can see the menu when inspecting the page...
This is my code in functions.php:
And this is the menu php block in headers.php:
Any help is appreciated :)!