Edit theme.liquid file to get announcement banner above header?
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).