Center Logo With Menu Links On Both Sides

Topic summary

Goal: Center the logo in the header with navigation menus on both sides, matching the provided desired layout images. Store URL shared: distinctz.com.

Approach proposed:

  • Add a second menu in the header section schema (type: link_list) and place its markup after the logo. Use an underscore in the setting id (secondary_menu) and set default to main-menu.
  • Update CSS to define grid areas (navigation, heading, secondary-navigation) and show both menus, aligning left/right menus around the logo.

Files and terms:

  • Edit header.liquid (Shrine theme suspected).
  • Schema refers to section settings JSON inside the Liquid file (e.g., link_list menu settings).
  • CSS grid-template-areas arranges header elements.

Issues encountered:

  • Error “Invalid schema: setting with id=‘secondary-menu’ default is invalid” fixed by using secondary_menu.
  • Persistent error likely due to duplicate ids (“id”: “secondary_menu”) in the schema.
  • A separate Shopify CLI bug was noted; temporary fix involves removing blocks with type “@app,” but not present here.

Status: Ongoing. The duplicate setting was removed; next steps are aligning CSS, ensuring only one secondary_menu setting exists, and assigning the right-side menu in theme settings.

Summarized with AI on January 6. AI used: gpt-5.

Hoping someone could help me out with creating code that would allow our logo to be centered in the header with menu links on either side. I have attached photos of our current and desired layout.

Current layout:

Desired layout:

Thanks Everyone!

Hello @Distinctz
can you share store URL?

1 Like

Hi @Distinctz

For that layout, you would need to add a second menu that will be on the right side of the logo.

So find probably in the header, schema, and place where the main menu id set. Make a copy of the code and change the ID, you can name it right or secondary menu. Then check the code for the main menu, copy it paste it after the logo, and change the menu ID. It would probably need some CSS to align the left menu, logo, and right menu.

@niraj_patel

URL is https://distinctz.com/

1 Like

distinctz.com

thanks for replying in which file can you edit the header?

It looks like you have a Shrine theme but I have not had a chance to work with it.

But it might be header.liquid or a similar name, or search in files “header__inline-menu”. Like I said first find in schema where main menu is defined, so for example if you have

{
      "type": "link_list",
      "id": "menu",
      "default": "main-menu",
      "label": "t:sections.header.settings.menu.label"
    },

add a secondary menu below, like

{
      "type": "link_list",
      "id": "secondary-menu",
      "default": "secondary-menu",
      "label": "t:sections.header.settings.menu.label"
    },

Then find in the code for a menu that starts with


Copy it and paste it after the logo code

# 
   
     
   

In that new code change class and also change code from menu to secondary_menu from settings


You would need some CSS changes, they go to different lines

// line 2064

  .header--middle-center {
    grid-template-areas:
      "navigation heading secondary-navigation icons";
    grid-template-columns: 2fr auto 1fr 1fr;
    column-gap: 2rem;
  }
// line 2277

.header__inline-menu {
  margin-left: -1.2rem;
  grid-area: navigation;
  display: none;
}
.header__inline-menu-secondary {
  margin-left: -1.2rem;
  grid-area: secondary-navigation;
  display: none;
}

// line 2433

  .header__inline-menu {
    display: block;
    justify-self: end;
  }
  .header__inline-menu-secondary {
    display: block;
  }
  .header--top-center .header__inline-menu {
    justify-self: center;
  }
  .header--top-center .header__inline-menu-secondary {
    justify-self: center;
  }

Assign the right menu in settings and that should be it. Note this is a rough draft of the steps and the code might not look like that

but it could guide you in the right direction. So you should get something like this

1 Like

thanks for helping me when i try to put the code for the second menu in i get a error:

  • Invalid schema: setting with id=“secondary-menu” default is invalid

how can i fix this error thanks for your help!

Hi @Distinctz

Sorry for the issues. Try this instead

{
      "type": "link_list",
      "id": "secondary_menu",
      "default": "main-menu",
      "label": "t:sections.header.settings.menu.label"
    },

I tried and got also a different error, which looks like bug from here

https://github.com/Shopify/cli/issues/1965

And temporal solution was to remove

{
      "type": "@app"
    }

from

"blocks": [
    {
      "type": "@app"
    }
  ]

But that way you lose a bit of functionality, you can not add some app section to the header if you have some app for that.

FRom your screenshot though, you should not have this problem.

1 Like

hello thanks for helping me i cant find the “blocks”: [ { “type”: “@app” } ] section is this still in the header.liquid file?

Well if you do not have it,great, disregard that whole part :slightly_smiling_face:

Try to just replace code for secondary_menu.

1 Like

i did that but still got the error?

Hi @Distinctz

Search in code “id”: “secondary_menu”, error suggests there are two same code blocks with that id.

Check it out or you can send me a private message with the whole header.liquid file.

1 Like

im going to send you the header.liquid in private message

i have now removed it what should i do next?