On this page
What this issue is
The hamburger menu is the three-line icon that opens your navigation on small screens. When it breaks, you tap it and nothing happens, it flickers and closes, or the menu opens but links can't be tapped.
On desktop the full menu is visible, so the site looks fine in your usual checks. The fault only shows at phone widths, which is why it often goes unnoticed for weeks.
Why it costs you leads or sales
On a phone, the menu is often the only route to pricing, contact, booking or shop pages. If it is dead, visitors who don't find what they need on the landing page leave. Paid mobile traffic suffers most, because you pay for every click that arrives.
- Ad clickVisitor lands on mobile
- Tap hamburgerNothing opens
- Pricing or contact pageNever reached
- Form or checkoutNever reached
The visitor lands fine, but the menu is the only way to the next step on mobile.
Example: illustrative numbers showing how a dead menu can cut mobile visits to the contact page.
How to check if your site has it
Test on a real phone
Open your homepage and key landing pages on an iPhone and an Android phone. Tap the icon several times and tap links inside the menu.
Use device mode
In Chrome, press F12, then Ctrl+Shift+M (Cmd+Shift+M on Mac). Pick a phone size, reload, and click the icon.
Read the Console
Open the Console tab. Red errors such as 'Uncaught TypeError' or 'jQuery is not defined' appearing on load or on click point to a broken script.
Check what sits on top of the icon
Right-click the icon in device mode and choose Inspect. Check whether another element, such as a cookie banner, chat widget or sticky bar, covers it.
Test in several browsers
Try Safari on iPhone and Chrome on Android. Some bugs only appear in one.
How to fix it
| Cause | Sign | Fix |
|---|---|---|
| JavaScript error earlier on the page | Red error in Console, menu script never runs | Fix or remove the failing script or plugin |
| Another element covers the icon | Inspect shows a different element at the icon position | Lower its z-index or move it |
| Plugin or theme conflict | Started after an update or new plugin | Disable plugins one by one, update or roll back |
| Menu script deferred, minified or blocked | Works after reload, or only sometimes | Exclude the menu script from optimisation |
| Missing or wrong breakpoint | Icon shows but menu stays hidden | Check the CSS media query and menu settings |
Find the conflict
Switch to a default theme such as Twenty Twenty-Four on a staging copy, or disable plugins one at a time, and retest the menu after each change.
Check optimisation settings
In your caching or speed plugin, exclude jQuery and the theme's menu script from 'delay JavaScript', combine and minify options, then clear the cache.
Check the theme's mobile menu setting
In Appearance > Customize (or your page builder's header settings), confirm the mobile breakpoint and that a menu is assigned to the mobile location.
Compare with the default theme
Preview your store with a fresh copy of Dawn. If the menu works, the cause is in your theme code or an app.
Check apps
In Online Store > Themes > Customize > App embeds, switch off apps one at a time and retest.
Look for edited theme code
In Edit code, check theme.liquid and header files for recently added scripts that cause console errors.
Use Preview mode
Open Preview, load the page on a mobile size and tap the menu. Pause tags one by one, especially Custom HTML tags, and see if the menu starts working.
Fix or remove the offending tag
Custom HTML tags that error or inject overlays can break the menu. Correct the code or add a trigger that excludes the affected pages.
Check the Navbar element
In the Designer, select the Navbar and confirm the Menu Button and Nav Menu are still inside it with their default classes.
Check the breakpoint and custom code
Make sure the Navbar's collapse breakpoint is set in the Navbar settings, and look for custom code in Project settings > Custom code that errors.
Publish and retest
The Designer preview can differ from the live site, so test the published URL on a phone.
Check the header element
In the funnel or website builder, open the mobile view and confirm the header's mobile menu is enabled and has items.
Remove conflicting custom code
Check custom JavaScript and CSS in page settings. Remove recent additions and retest on a phone.
Edit the mobile menu
In the editor, switch to mobile view, select the hamburger menu and check it is connected to a menu with items.
Remove overlapping elements
Move any element that sits over the icon in mobile view, and check custom embeds for scripts that fail.
Check Code Injection
In Settings > Developer Tools > Code Injection, remove recently added scripts and retest.
Check the mobile menu style
In Site Styles or the header settings, confirm the mobile menu style and the burger icon are enabled.
Fix script errors first
Resolve every console error that appears before your menu script runs, because one uncaught error stops the rest of the script.
Use a robust toggle
Make sure the click handler is attached after the DOM loads and the button has an aria-expanded state. See the snippet below.
<button id="menu-toggle" aria-expanded="false" aria-controls="main-nav">Menu</button>
<nav id="main-nav" hidden>
<a href="/pricing">Pricing</a>
<a href="/contact">Contact</a>
</nav>
<script>
document.addEventListener('DOMContentLoaded', function () {
var btn = document.getElementById('menu-toggle');
var nav = document.getElementById('main-nav');
btn.addEventListener('click', function () {
var open = btn.getAttribute('aria-expanded') === 'true';
btn.setAttribute('aria-expanded', String(!open));
nav.hidden = open;
});
});
</script>#menu-toggle {
position: relative;
z-index: 1000;
}How to confirm it's fixed
- The icon opens the menu on a real iPhone and a real Android phone
- Tapping the icon again closes the menu
- Every link inside the menu can be tapped and loads the right page
- The Console shows no red errors on load or on tap
- It works with the cookie banner and chat widget visible
- It works after clearing the cache and on a first visit in a private tab
How to prevent it happening again
Menu breaks usually follow a change: a theme or plugin update, a new tag, a new widget or a speed setting. Build a short mobile check into every release.
Day 0
A plugin update or new script is added
Day 0
Menu stops opening on phones; desktop looks fine
Days 1-14
Mobile visitors can't reach other pages and leave
Day 15
Someone taps the menu on a phone and notices
Day 15
Script fixed and menu works again
- Test on a phone after every theme, plugin, app or tag change
- Use a staging site for updates where you can
- Add the mobile menu to your release checklist
- Keep scripts that run on every page to a minimum
- Review new overlays, banners and widgets at phone width
How FunnelGuard handles this
FunnelGuard detects this only partly. It can catch a dead hamburger menu when a click on the menu is a step in one of your monitored journeys. In that case, a menu that doesn't respond makes the step fail, you get one alert after a re-check from a second region, with a screenshot and a likely cause.
What it does not do: it doesn't automatically test every menu on every page. If no journey includes a click on the menu, a broken menu won't be flagged by itself. It also doesn't judge things like whether every menu link goes to the right page.
Frequently asked questions
Questions people ask
Why is my hamburger menu not opening on mobile?
The most common causes are a JavaScript error that stops the menu script, another element covering the icon, or a theme or plugin conflict after an update. Open the page in browser device mode and check the Console for red errors, then inspect what sits on top of the icon.
Why does my mobile menu work on desktop but not on phones?
On desktop the full menu is shown, so the hamburger script isn't needed. At phone widths the collapsed menu depends on JavaScript and CSS breakpoints, so errors or overlays that only affect small screens go unnoticed on a computer.
How do I test a hamburger menu on mobile?
Use a real iPhone and Android phone, and also Chrome's device mode (F12, then Ctrl+Shift+M). Tap the icon, tap links inside the menu, and watch the Console for errors.
How do I fix a WordPress mobile menu that won't open?
Disable plugins one at a time or switch to a default theme on a staging copy to find the conflict. Also exclude jQuery and the menu script from any 'delay JavaScript' or minify setting in your caching plugin, then clear the cache.
Can a cookie banner or chat widget block the hamburger menu?
Yes. If a banner, chat bubble or sticky bar sits above the icon, taps hit that element instead. Inspect the icon in device mode and lower the overlay's z-index or move it on mobile.
Can Google Tag Manager break my mobile menu?
It can. A Custom HTML tag with a script error or one that injects an overlay can stop the menu working. Use Preview mode, pause tags one by one, and fix or restrict the one that causes it.
Can FunnelGuard tell me if my hamburger menu is broken?
Only partly. If a click on the menu is a step in one of your monitored journeys, a failure triggers an alert. FunnelGuard doesn't check every menu on every page, so test the rest by hand.
Related issues
- CNV-094CTA button not clickable (covered by another element)Fix guide
- CNV-096CTA uses JavaScript that errors so nothing happensFix guide
- CNV-103Navigation link to pricing/contact brokenFix guide
- CNV-107CTA tap target too small on mobileFix guide
- CNV-101Sticky header CTA overlaps contentFix guide
- CNV-095CTA hidden below the fold on mobileFix guide