Welcome to the Liquify Community

Updated 6 months ago

Edit theme.liquid file to get announcement banner above header?

At a glance

The community member is trying to add an announcement banner above the header section in their theme. They are unsure if it is possible to edit the part of the theme.liquid file that is inside the page-wrapper. They are concerned that any manual edits might be overwritten during a merge. The community member is considering adding the announcement banner as part of the navigation, but this would make it harder to achieve the desired sticky functionality (sticky nav, but banner scrolls out).

In the comments, another community member indicates that they figured out how to add the announcement banner by placing it in the desired position on the home page.

I'd like to add an announcement banner above the header section in my theme. It is my understanding that this is defined in the theme.liquid file, but I don't know if it is possible to edit the part of the file which is inside of the page-wrapper. I could edit it manually in GitHub, but I guess it would be overwritten the next time I merge. Is it possible to mark a section as something which should be included in the theme.liquid file like that?

My alternative is to create the announcement banner as part of the navigation, but that makes it harder to create the sticky functionality I'm looking for (i.e. sticky nav, but banner scrolls out).
Attachments
theme_liquid.png
announcement_banner.png
banner.png
r
1 comment
I figured it out on my own. I just had to add it in the position I wanted it on the home page πŸ™Œ
Attachments
Skrmbillede_2024-09-05_kl._10.32.20.png
Skrmbillede_2024-09-05_kl._10.32.32.png
Add a reply
Sign up and join the conversation on Discord