I want to change my header menus on every different pages how to achieve this functionality
Topic summary
Goal: show different header menus on different Shopify pages.
Approach provided and adopted:
- Create a page-level metafield (Settings > Custom data > Pages > Add definition) of type “text” to store the menu name for each page. Metafields are custom fields that hold per-page data.
- For each page, enter the corresponding navigation menu name into that metafield. Ensure those menus exist in Navigation.
- Edit Online Store > Theme > Edit code > header-mega-menu.liquid to read the page’s metafield and render the matching menu. Liquid is Shopify’s templating language used to pull dynamic data into theme files.
Artifacts: screenshots were shared to illustrate metafield setup and the header-mega-menu.liquid file location and changes; they are central to following the steps.
Other input: a request was made to share the store URL and a general suggestion to assign header menus per page.
Outcome: the original issue was resolved after implementing the metafield + theme code update. Status: resolved; no open questions noted.
Hey you need to assign Header menu for different pages.
Can you please share store url so that I check which code will work regarding your theme.
Thanks
You can Create metafield for every page into settings >> custom data >> pages >> add defination
create a metafiled with type text and entet the corrosponding menu name that u want to show on page for every page
go to Online Store >> Theme >> Edit Code >> header-mega-menu.liquid
update code to read metafiled for dynamic menus and save make sure create menu for every page and enter menu name metafield
Thanks got it now it’s resolved

