{HELP] Different Headers for different page

Topic summary

A user working with Shopify’s Dawn theme wants to display different headers based on specific page templates. They attempted to implement a solution by duplicating the header.liquid file and using conditional Liquid code to check the template name ({% if template.name == 'index' %}), but this approach isn’t working.

Attempted Solution:

  • Created duplicate header file (header2)
  • Used Liquid conditional logic to switch between header and header2 sections based on template
  • Referenced a previous community discussion for guidance

Current Status:
The implementation has failed. A respondent suggested checking the theme customizer settings and offered to investigate further with store access if the issue persists. The problem remains unresolved and requires troubleshooting of either the Liquid code logic or theme configuration.

Summarized with AI on October 31. AI used: claude-sonnet-4-5-20250929.

Hello!

I am using the Dawn theme and want to use a different header for a specific page template, Suppose whenever a page is created using a particular template of the page a completely different header is shown.

I tried to use this method but its not working for me

https://community.shopify.com/c/shopify-discussions/help-how-to-make-my-two-different-headers-show-on-different/m-p/2472609

I have created a duplicate “header.liquid” file and used this code

{% if template.name == ‘index’ %}
{% section ‘header’ %}
{% else %}
{% section ‘header2’ %}
{% endif %}

Can somebody Help?

Hi @USAMARANA326 ,

You need go to customize to to setup it as well. If it still doesn’t work. We need access your store to check it.