To create a submenu in WordPress, go to the site’s dashboard, Appearance > Menus, and create or select the existing menu that will have submenus. All you have to do is drag the element below the light and move it a little to the right so that it forms a hierarchical structure. In my example below, Asia, Europe and Africa are at the primary level. Spain and France are submenus of the second-level item called Europe, and Paris is a submenu of France (a third-level item).
WordPress submenus
By default, it will be displayed as a nested dropdown in most default theme menus or menu widgets/blocks:
WordPress nested submenus
If you want to customize how the menu items look, use the styling options provided by the builder, menu plugin, or theme widgets or blocks. Usually, you can change the background and text colors, typography and paddings even if you use the simplest menu tools. However, if you need more, specifically to change the behavior, layout, animations, width, etc., you’ll need to apply custom CSS, create a custom walker, or use a dedicated menu plugin that provides advanced settings.
Mega menu in WordPress and how to create it
A mega menu is kind of a sophisticated version of a submenu, and it is absolutely essential for many types of websites, for example, eCommerce or any rich content, because there is basically no other way to display really complex structures and many elements without using it.
While the simple nested submenus I discussed in the previous section are default WordPress functionality, mega menus need to be custom coded or implemented using mega menu plugins. And to be honest, custom coding such menus is not always a great idea, as it is very time consuming and seems like reinventing the wheel, while there are quite a few good solutions on the market.
Depending on the WordPress site builder or editor you use, there are different tools for creating both simple and complex menus, so let’s get down to those options.
