Parent pages in Divi mobile menus don't link by default — here's how to fix it

By default, Divi's mobile menu collapses parent categories into dropdown toggles. When a visitor taps a parent item on their phone, the menu expands to show child pages instead of navigating to the parent page itself. If you want the parent page to be clickable while keeping the dropdown arrow functional, you need to add custom code to your Divi site.

The solution involves either using Divi's built-in menu settings combined with CSS, or adding a small snippet of JavaScript. Both approaches work; which one you choose depends on whether you want to edit code directly or stay within Divi's visual interface.

Key Takeaways

  • Divi's mobile menu treats parent items as dropdown toggles by default, preventing clicks from navigating to the parent page URL.
  • You can make parent links work by adding a CSS rule that targets mobile menu items, or by using a JavaScript snippet that detects clicks on parent labels.
  • The CSS approach works best if your parent pages don't need dropdowns; the JavaScript approach lets you keep both the link and the dropdown arrow functional.
  • Test your changes on an actual mobile device or use your browser's mobile view tool to confirm the parent link responds to taps.

Understanding why parent links don't work in Divi mobile menus

Divi's mobile menu is designed to prioritize navigation hierarchy. When you have a parent page with child pages underneath it, Divi assumes you want visitors to see the child pages first. On mobile screens, where space is limited, Divi converts parent items into expandable sections rather than direct links.

This happens because Divi adds a click handler to parent menu items that toggles the dropdown open or closed, instead of allowing the browser's default link behavior. The parent page URL exists in the HTML, but the JavaScript intercepts the click before the browser can follow the link.

Method 1: Using CSS to enable parent links

The simplest approach is to add a CSS rule that removes Divi's dropdown behavior on mobile. This works well if your parent pages don't have child pages, or if you're willing to remove the dropdown arrow entirely.

Go to Divi → Theme Options → Custom CSS and add this rule:

.mobile_menu_bar .et_mobile_menu a { pointer-events: auto; }

This restores the default link behavior to mobile menu items. However, this approach has a limitation: if you have parent items with dropdowns, the arrow will still be visible but clicking the parent text won't expand the menu — it will navigate directly to the parent page instead.

If you want to keep dropdowns functional while also making parent links work, use Method 2 instead.

Method 2: Adding JavaScript to make parent links and dropdowns coexist

This approach lets you click the parent link to navigate to the parent page, while keeping the dropdown arrow functional for expanding child pages. You'll add a small JavaScript snippet that detects where on the parent item you clicked.

Go to Divi → Theme Options → Integration and paste this code into the Add code to the head of your blog field:

<script> document.addEventListener('DOMContentLoaded', function() {   var mobileMenuItems = document.querySelectorAll('.et_mobile_menu li.menu-item-has-children > a');   mobileMenuItems.forEach(function(link) {     link.addEventListener('click', function(e) {       if (e.target.tagName === 'A') {         window.location.href = this.href;       }     });   }); }); </script>

This code finds all parent menu items and allows clicks on the link text itself to navigate to the parent page. The dropdown arrow remains separate and still toggles the child menu open or closed.

Method 3: Using Divi's menu settings without code

If you want to avoid custom code entirely, you can restructure your menu in WordPress itself. Go to Appearance → Menus and edit the menu you're using in Divi.

For each parent item you want to be clickable, uncheck the Link Target option and make sure the parent page URL is entered in the URL field. Then, in Divi's mobile menu settings under Divi → Theme Options → Mobile Menu, disable the dropdown toggle for that specific item if Divi allows it.

This method is less reliable because Divi's mobile menu behavior is controlled by its own JavaScript, not by WordPress menu settings. You'll likely still need one of the code-based methods above.

Testing your changes on mobile devices

After applying your chosen method, test the menu on an actual phone or tablet. Open your site in a mobile browser and tap each parent menu item to confirm it either navigates to the parent page or expands the dropdown as intended.

If you don't have a physical device handy, use your browser's developer tools. In Chrome or Firefox, press F12, click the mobile device icon in the top left of the developer panel, and select a phone size like iPhone 12. Refresh your page and test the menu there. Mobile view in the browser is not identical to a real phone, but it's close enough to catch major issues.

Troubleshooting common problems

If the parent link still doesn't work after adding code, clear your browser cache and your site's cache plugin (if you use one like WP Super Cache or W3 Total Cache). Cached versions of your pages may still have the old JavaScript.

If the dropdown arrow disappears or stops working, you may have used a CSS rule that's too broad. Revert to the JavaScript method, which is more precise. If the JavaScript method doesn't work, check that you pasted it into the correct field in Divi's Theme Options — it must go into Integration, not Custom CSS.

If your menu items are still not clickable, inspect the page with your browser's developer tools. Right-click on a parent menu item, select Inspect, and look at the HTML. Confirm that the parent item has the class menu-item-has-children and that it contains an <a> tag with an href attribute pointing to the parent page URL.

Frequently Asked Questions

Will this affect my desktop menu?

No. Both methods target only the mobile menu using CSS classes or JavaScript selectors that apply exclusively to mobile breakpoints. Your desktop menu behavior remains unchanged.

What if I only want some parent items to be clickable?

You can add a custom CSS class to specific menu items in WordPress. Go to Appearance → Menus, expand a menu item, and add a class like "clickable-parent" in the CSS Classes field. Then modify the JavaScript to target only items with that class.

Does this work with Divi's built-in mobile menu or third-party menu plugins?

This guide covers Divi's native mobile menu. If you're using a plugin like Max Mega Menu or a custom menu system, the HTML structure and class names will differ, and you'll need to adjust the CSS selectors or JavaScript accordingly.

Can I make the dropdown arrow clickable separately from the parent text?

Yes, but it requires more advanced JavaScript that detects which part of the menu item was clicked. The methods above treat the entire parent item as a link. If you need fine-grained control, consider using a dedicated mobile menu plugin instead.