Add menu in Shopify

To add menu to your theme, you can use the linklists object to find the menu that you want to output. The default menu is the Main menu, which can be accessed with it’s handle main-menu.

{% for link in linklists.main-menu.links %}
  <!-- menu content -->
{% endfor %}

And here is how to display menu in the theme. Add code below to the /sections/header.liquid

<ul class="menu">
  {% for link in section.settings.menu.links %}
    <li class="menu-link">
      <a href="{{ link.url }}">{{ link.title }}</a>

      {% if link.links.size > 0 %}
        <ul class="menu dropdown-child">
          {% for child_link in link.links %}
            <li class="menu-link">
              <a href="{{ child_link.url }}">{{ child_link.title }}</a>

              {% if child_link.links.size > 0 %}
                <ul class="menu dropdown-grandchild">
                  {% for grandchild_link in child_link.links %}
                    <li class="menu-link">
                      <a href="{{ grandchild_link.url }}">{{ grandchild_link.title }}</a>
                    </li>
                  {% endfor %}
                </ul>
              {% endif %}
            </li>
          {% endfor %}
        </ul>
      {% endif %}
    </li>
  {% endfor %}
</ul>