How to add another menu to header section? (Horizon Theme)

Hi, I am looking to add another menu element to the Header section in the horizon theme for my store. None of the existing articles about this have helped at all so I thought I would make my own and ask.

I have already created the menu that I want to add, just having trouble coding.

TIA to anyone that can provide me some insight into the coding!

Not quite clear – do you want to have another menu item(s)/submenu added to the current one? Then you’d rather edit your current menu.

If your goal is to add another menu independently from the main one, then it’s a complex task and not only coding aspect, but rather design-wise. Also what should happen on mobile?

Under header in the theme editor, the default is logo and menu. I want another menu which is independent of the default menu in the theme. on mobile the menu would be reduced to icons, but I just want to focus on actually adding it in

Open section/header.liquid
Find this line (around line 50-70 in the navigation area)

{%- if section.settings.menu != blank -%}

Right after that menu block, add:

{%- if section.settings.secondary_menu != blank -%}
     <nav>
       {%- for link in linklists[section.settings.secondary_menu].links -%}
         <a href="{{ link.url }}">{{ link.title }}</a>
       {%- endfor -%}
     </nav>
   {%- endif -%}

Open section/header.json and add to the settings array:

{
     "type": "link_list",
     "id": "secondary_menu",
     "label": "Secondary Menu"
   }

Save, update the customizer - choose your menu.

It is the horizon path. Ready.

that line of code doesnt exist for me in header.liquid, also in the header-group.json it says that it is a global asset or something and my code may be overwritten by shopify in future updates, which isnt ideal.

Basic theme, basic functions… :man_shrugging:

Adding another menu block to Horizon theme’s header is not something that is easily done. And even if you did manage to do it (with much work), theme updates would probably not handle it well…

That’s an advanced theme customization beyond the scope of the forums to build or teach you how to do.
Either:

New Merchant 101: If there’s no business value in it don’t spend yours or anyone’s time on such things.

@GowStudios adding new menu will need theme code to be edited. But in case of updates it can break though.

It is possible to add new menu.

I fiddled with the code for ages but couldnt figure it out (no experience) just gonna leave it for now as PaulNewton said, it wouldnt add any business value atm so not worth it