> For the complete documentation index, see [llms.txt](https://elessi-docs.nasatheme.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://elessi-docs.nasatheme.com/header-and-menu/menus/config-mega-menu/how-to-set-up-mega-menu-vertical.md).

# How to set up Mega menu vertical

![](https://980438068-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MV0r5tR9bPLGnwB_pyk%2Fuploads%2FT1nzVOPlLLgaO7Wxw85j%2Fimage.png?alt=media\&token=a6c98ccd-324f-4ce9-906e-4f996d70e7c0)

### Here is the instruction you can follow if you desire to set up a menu vertical for your site:

<mark style="color:blue;">**Step 1**</mark> - Simply, navigate to **Appearance** **→** **Menu**

<mark style="color:blue;">**Step 2**</mark> - Create a new menu that you want to use do the **vertical menu** and click Select button

<mark style="color:blue;">**Step 3**</mark> - On the right, feel free to drag and drop menu items to organize them

![](https://980438068-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MV0r5tR9bPLGnwB_pyk%2Fuploads%2F6hTq7EbtTbHHmtTyNfXQ%2Fimage.png?alt=media\&token=651b1cbb-eb31-4f57-97b0-ac414512880c)

<mark style="color:blue;">**Step 4**</mark> – When you are done moving menu items, check a menu location at the bottom of the page and click **Save Menu**

![](https://980438068-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MV0r5tR9bPLGnwB_pyk%2Fuploads%2FJeolduXInsa3pKdDM0pW%2Fimage.png?alt=media\&token=b7373423-8c5d-4947-b622-89a732a1b21b)

{% hint style="warning" %}
**NOTE:** The vertical menu only works to <mark style="color:green;">**Header Layout 4**</mark> and <mark style="color:green;">**Header Layout 6**</mark>, to set up the vertical menu please follow these steps:
{% endhint %}

Go to **Appearance** **→ Theme Options → Header and Footer**

![](https://980438068-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MV0r5tR9bPLGnwB_pyk%2Fuploads%2FBJuHkNt4ts7N5FzS0QWX%2Fimage.png?alt=media\&token=b818d444-b4c2-4416-840c-8e709ac38faa)

#### <mark style="color:red;">**Elessi**</mark>**&#x20;theme is designed by default with 3 levels of sub-menu, if you want to display sub-menu with 4 levels , please insert the following code in / wp-content / themes / elessi-theme-child / functions .php:**

{% tabs %}
{% tab title="PHP" %}
{% code title="function" %}

```php
add_filter('nasa_max_depth_vertical_menu','custom_max_depth_menu');

function custom_max_depth_menu($depth) {

return 4; // Return max depth menu – Default is 3

}

/* ===================== */
```

{% endcode %}
{% endtab %}
{% endtabs %}

### <mark style="color:red;">RESULT</mark>

![](https://980438068-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MV0r5tR9bPLGnwB_pyk%2Fuploads%2FGo7aLIpHgAbFgfI2LywF%2FElessi%20%E2%80%93%20Just%20another%20WordPress%20site%202022-03-18%2014-52-11.jpg?alt=media\&token=0bab3822-abf2-4c54-9364-7a00b140b05b)

![Please change the number here if you want to up any sub-menu levels](https://980438068-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV0r5tR9bPLGnwB_pyk%2F-MlEV5pI2GKETBZUsBjN%2F-MlFfiAfw7ICVY0O-JD0%2FOpera_2021-10-05%2020-39-45%402x.jpg?alt=media\&token=df0c433e-aa05-4c9f-adec-ab3e25c5e966)
