Archived topic
Mobile Menu - Nav Menu In Source Code Twice
3 replies · Started by Daniel on July 11, 2019
Hi there,
I just recently installed the mobile menu on my website. While looking at the source code, I now realize that there are two separate sections in the source code for my primary navigation menu. 1 is for the desktop version and 1 is for the mobile menu. So basically, in the source code, I'm linking to all my content TWICE instead of just once like it was before.
Is there anyway to have a mobile menu, without repeating all the navigation URLs in the source code twice?
Hi there,
its not an issue that there are two navs with identical links its quite common when mobile navigations or off canvas panels are used.
If you must remove it then you would need to disable the Mobile Header option and just leave the normal nav in place.
Okay I see. Basically, what I want to do, is make it so that my Menu and Header are next to each other on mobile phone, rather than the header above and the menu below. Is the only way to do that through the Mobile Menu option or is there another way?
You can try using this popular option here:
https://docs.generatepress.com/article/navigation-as-a-header/
Should able to achieve basically the same thing on desktop and same thing on mobile without mobile header:
Let me know if this helps :)