The main menu of your store is like a directory to the different departments in your store. Each option represents a different category of products. The position and presentation of the top navigation might vary by theme, but the way it works is essentially the same.
The category structure of your catalog can influence how well your site is indexed by search engines. The more deeply nested a category, the less likely it is to be thoroughly indexed. As a general rule, anywhere between one and three visible levels is considered to be the most effective. The root category counts as the first level, although it doesn’t appear in the menu. The maximum number of levels that are available in the top navigation is determined by the configuration. In addition, there might be a limit to the number of menu levels that are supported by your store theme.
Counting menu levels
Level 1: The first level is the root category, which in the sample data is named “Default Category.” The root is a container for the menu, and its name does not appear as an option in the menu.
Level 2: On a desktop display, the top navigation is the main menu that appears across the top of the page. On a mobile device, the main menu typically appears as a fly-out menu of options. The second-level options in the Luma store are “What’s New,” “Women,” “Men,” “Gear,” “Training,” and “Sale.”
Level 3: The third-level appears below each main menu option. For example, under “Women,” the third-level options are “Tops” and “Bottoms.”
Level 4: The fourth-level options are subcategories that fly out from a third-level option. For example, under “Tops,” the fourth level menu options are “Jackets,” “Hoodies & Sweatshirts,” “Tees,” and “Bras & Tanks.”
To set the top menu:
Create categories to define the category structure of the main menu. For a multistore installation, a different main menu can be assigned as the root category for each store.
To set the depth of the top menu:
1. On the Admin sidebar, tap Stores. Then under Settings, choose Configuration.
2. In the panel on the left, expand Catalog. Then, choose Catalog.
3. Expand the Category Top Navigation section.
Because the depth of the top navigation has a global configuration scope, the setting applies to all websites, stores, and store views in the Magento installation. The Category Top Navigation configuration section is available only when Store View in the upper-left corner is set to “Default Config.”
4. To limit the number of subcategories that appear in the top navigation, enter the number in the Maximal Depth field.
The default Maximal Depth value is zero, which does not place a limit on the number of subcategory levels.