🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!
Guides & Tutorials November 4, 2026

How to Add a Mega Menu to WordPress (Fast and Accessible)

GravityExtra
How to Add a Mega Menu to WordPress (Fast and Accessible)

A mega menu is a navigation menu whose items open wide panels instead of narrow dropdown lists. Stores use them to show every category at once, magazines to show sections and recent stories, and service businesses to show their offers next to a contact box. Done well, a mega menu helps visitors find things in one step. Done badly, it hides content behind hover effects that keyboard users, screen reader users and phone visitors cannot use. This guide explains when a mega menu makes sense, how to plan one, and how to add a mega menu to WordPress with columns, images, icons and tabs while keeping it fast and accessible.

When a mega menu helps

A normal dropdown is fine for five or six links. It gets hard to use when a menu item has twenty children, or children with their own children: visitors chase nested flyouts across the screen and lose the menu when the pointer slips. A mega menu shows all of them at once in columns, so the structure of your site is visible at a glance. It also has room for things a dropdown cannot hold well: a product image, a short promotion, opening hours, or a few highlighted guides.

A mega menu is not always the answer. If your site has a handful of pages, a plain menu is easier. If a top-level item has three children, a small dropdown is clearer than a big empty panel. Use mega panels for the items that really have a lot behind them, and keep the rest simple.

Plan the panel before you build it

Start from your existing menu. Group the links under each top-level item into three to five columns with a clear heading each: product types, topics, regions or audiences. Write the headings as visitors would say them, not as internal department names. Then decide what else belongs in the panel. One image or one promotion per panel is usually enough; more turns the panel into an advert and pushes the links away. Finally, check the panel on a phone in your head: every column will stack into one list, so the most important links should come first.

Build it on top of your WordPress menu

The safest way to add a mega menu is to keep using the menus WordPress already has. Your pages, categories and custom links stay in Appearance → Menus, in the order you set, and the mega menu is a layer on top. If you ever switch it off, the theme shows the same menu as a dropdown again and nothing is lost. GravityExtra Mega Menu works this way: each top-level item gets an Open a mega panel option and a builder for rows, columns and content.

A horizontal WordPress mega menu open under Shop with four columns of links, an image, icon cards and a short offer
A mega panel built from a normal WordPress menu.

The quickest panel needs no design at all: switch an item to a mega panel and leave the layout empty, and every sub-menu item becomes a column heading with its own children as links. For a designed panel, add rows and columns in a twelve-column grid and fill each column with content blocks.

What to put in the columns

  • Sub-menu links from the menu itself, so links are still managed in one place.
  • Images with alternative text, a caption and an optional link, for a new product or a featured guide.
  • Icon cards: an icon, a title and one line of text, for things like free shipping, gift cards or support.
  • Custom HTML for a short promotion, cleaned of scripts and event attributes before it is shown.
  • Widgets such as opening hours or a search box, through dedicated widget areas.
  • Synced patterns: anything you can design with the block editor, edited once and reused in every panel.
  • Tabs when a panel has several groups that do not fit side by side.

Make it work with a keyboard and a screen reader

Many mega menus open only on hover. That leaves out everyone who does not use a mouse. The pattern accessibility specialists recommend for site navigation is the disclosure pattern: links stay links, and every panel gets a separate button that says whether it is open. Look for these points, or test them yourself on your own menu:

  • Tab reaches every link and every panel button in order, and the focus ring is clearly visible.
  • Enter or Space on the button opens the panel, and the button reports that it is expanded.
  • Esc closes the panel and puts focus back on its button.
  • The arrow keys move between items and through the links of an open panel.
  • Closed panels cannot be reached with Tab and are not read out.
  • Icon-only items, such as a cart icon, still have a text label for screen readers.
  • Tabs inside a panel work with the arrow keys and announce which tab is selected.

GravityExtra Mega Menu builds all of this in. It also respects the reduced motion setting on visitors’ devices, so the opening animation is skipped for people who find movement uncomfortable.

Phones need a different menu

A panel with four columns does not fit a phone screen, and hover does not exist on touch screens. Below a breakpoint you choose, the mega menu turns into a menu button. It can open an off-canvas drawer that slides in from the side, with a close button, a dimmed page behind it and keyboard focus kept inside, or an accordion that opens below the button. Inside, every panel expands in place and its columns stack into one list.

The mega menu on a phone as an off-canvas drawer with the Shop panel expanded in one column
The same menu as an off-canvas drawer on a phone.

Vertical menus for sidebars

Category lists in a sidebar can use mega panels too. A vertical mega menu opens each panel beside the menu instead of below it, which works well for shops with many departments or documentation with many sections. On phones it behaves like the horizontal menu.

Hover or click?

Hover feels quick on a desktop with a mouse, but a panel that opens whenever the pointer crosses the menu can get in the way, especially when the menu sits right above the page content. Click is calmer and better for panels with a lot of content or a search box. A good mega menu lets you choose per menu and keeps the buttons working by click and keyboard in both modes, with a short delay before a hovered panel closes so it does not vanish when the pointer slips.

Keep the menu fast

A mega menu is on every page, so its weight counts. Check three things. First, does the menu load a large script library on the front end? A menu can be handled with a small plain script. Second, does it load an icon font or fonts from another server? Inline SVG icons and the fonts already on the site avoid extra requests. Third, does it load its files on pages that do not show it? GravityExtra Mega Menu loads its stylesheet and a small deferred script only on pages that show a mega menu, has no jQuery dependency on the front end, and makes no outside requests apart from its own license and update checks.

Style it to match your theme

Set the colours of the bar, the panels, headings, links and the focus ring, the font, sizes, spacing, corners, the panel width and the animation, and check them in a live preview of your own menu before you save. Keep strong contrast between text and background in both the bar and the panels, and make the focus ring a colour that stands out against both.

Classic and block themes

Classic themes print their menus in named locations, so the mega menu can take over a location without touching theme files. Block themes build the header in the Site Editor; there you add a Mega Menu block to the header template part and pick the menu. Both ways use the same menus and the same panels, so you can switch themes later without rebuilding your navigation.

A short checklist

  • Use mega panels only for items with many links.
  • Three to five columns with clear headings; the most important links first.
  • At most one image or one promotion per panel.
  • Test with the keyboard alone: Tab, Enter, Esc and the arrow keys.
  • Test on a phone: the drawer or accordion, and nothing cut off.
  • Check that the menu files load only where the menu is shown.

Frequently asked questions

Do I have to rebuild my menu? No. The mega menu uses the menus you already have in Appearance → Menus and adds panels to the items you choose.

Does it need Gravity Forms or a page builder? No. It is a standalone WordPress plugin. Rich content comes from synced patterns made with the block editor.

Will my site break without a license? No. Visitors see your theme’s normal menu and the block shows a plain list of the same links until the license is active.

Can I have more than one mega menu? Yes. Turn it on for several theme locations, or add several blocks, each with its own menu and direction.

Read the full setup guide for every option, or get GravityExtra Mega Menu and turn your first menu item into a mega panel today.

0
0
Your Cart
Your cart is emptyReturn to Shop
🔥 FREQUENTLY BOUGHT TOGETHER
Complete Combo & Save 40%!
ITEM IN YOUR CART
Gravity Forms Klaviyo Add-on
$39.00/yr
+
🎁 RECOMMENDED ADD-ON SAVE 40% OFF
Original Price: $39.00/yr
Bundle Special Price: $23.40/yr