Is there a way to edit the code so it would still show the menu bar on top and just delete the 2 announcement bars? Now it deleted the entire header section. tnx
Topic summary
A user wants to remove the announcement bar and footer menu specifically from their cart page while keeping other elements intact.
Initial Solution:
- Add CSS code to the theme.liquid file (before the tag) that hides elements when template.name equals ‘cart’
- This targets the cart page only
Refinement:
- The original code removed the entire header section, including the menu bar
- User requested to keep the top menu bar visible and only remove the two announcement bars
- Updated CSS code provided to preserve the header while hiding only the announcement sections
Implementation Steps:
- Navigate to Shopify admin → Online Store → Themes
- Click Actions → Edit code on the active theme
- Locate theme.liquid file
- Insert the conditional CSS code before tag
- Save changes
Screenshots were shared showing the expected results with the header menu remaining visible while announcement bars are hidden on the cart page.