Mobile Menu gone

I am working on mars-theme as a starter theme. The mobile menu is not showing up in 560 px width as it should. The menu links just disappears, and no hamburger menu replaces it.

I have not changed anything, only fetching a menu from wp according to the tutorial, and that is working.

Hi @s74,

The repo you have provided is empty. Could you please add the files? :slight_smile:

There was something wrong with the repo, here is a new one, hope it works better:

I got the hamburger to show up now, I had to write the menu name in the array for menu (not only for menuUrl) in the index.js file.

But when I click the hamburger I get a blue page with a “p” and 404 if I expand the web browser window. See images.Skärmavbild 2021-10-28 kl. 10.04.52

Any suggestions why I get that blue page and 404 when clicking on the hamburger?
Thanks :slight_smile:

Have you installed the menu rest api plugin in the worpress install?

You do not need menu: [“primary-menu”]

Yes, I have installed the menu plugin and the menu in desktop size works fine.

I do need the menu: [“primary-menu”]. It solved the problem with the missing hamburger. If I remove that, the hamburger disappears again.

Now the error is that there is only a blue page with a p when you click the hamburger. Error 404.

The hamburger menu is a seperate menu, and you are not importing the wp menu there. When you added the “menu” state, the hamburger is showing because there is something there.

In this file you are using the old menu, not the new one you are importing. So you need to do the same thing that you did nav.js

Thank you :slight_smile: . But how do you mean do the same? I tried to copy the code from nav.js, but I get an error


Take a look at my old repo, here you can see the mobile menu I had.

I have made the new version with next, but this website is still available on

Thankyou, but maybe there has been some kind of update to Frontitys mars-theme, because your solution doesn’t seem to work. I get more error than with the solution I have with the blue page.

I did not use the mars theme, I made my own. I’ll take a look at your code and make pr if I find something. :slight_smile:

Thank you! That is so nice of you :)!

I have updated the repository with updates

Thank you! Now it works! :hugs:

I still need to have this though: menu: [“primary-menu”] in the index.js.
But I guess as long as it works that is fine. :slightly_smiling_face:

Hi, if you have to do that, there is still something not quite right. Can you commit the changes you have done to the repo? :slight_smile: