Hide your website header inside the app
Updated
Your website's own header and footer usually duplicate the native top bar and tabs. Hide them inside the app with a few lines of CSS. Visitors on the web still see them. Shopify stores will be able to use the theme add-on instead, without any CSS (available with our next Shopify app update).
1. Find the selectors
Open your site, right-click the header and choose Inspect. Note its class or ID, for example .site-header.
2. Add custom CSS
In App Studio, open Web Overrides → Custom CSS and paste:
/* Only applies inside the app */
.site-header,
.announcement-bar,
.site-footer {
display: none !important;
}3. Check the live preview
Press Rebuild preview. The header disappears in the app; your website is unchanged.
Shopify stores: the theme add-on
Coming: the theme add-on is available with our next Shopify app update. Until then, use the CSS above.
Shopify stores don't need CSS. The AppSorcerer theme add-on hides the header, the announcement bar and the footer inside your app, and keeps working when you edit your theme.
- In App Studio, open Web Overrides → Shopify theme add-on and press Open theme editor.
- Your theme editor opens at App embeds with AppSorcerer: Hide header & footer switched on. Press Save.
- Open your app on a phone: the header and footer are gone. Visitors on the web still see them.
In the embed's settings you can:
- choose what to hide: the header, the announcement bar, the footer, or any of them
- hide more parts of the page under More elements to hide: one CSS selector per line, for example
.newsletter-popup(up to 20) - enter a word from your user agent under Extra app user agent text, only if you replaced the app's user agent in Web Overrides → User agent
Good to know:
- The add-on recognises your app by
AppSorcererin its user agent, and adds theappsorcerer-appclass to the page, so your theme's own CSS can usehtml.appsorcerer-appto restyle anything else in the app. - It works in your theme, so the preview in App Studio still shows your header and footer. Check the result in the app.
- If you publish a different theme, switch the add-on on in that theme too.
- Once the add-on is on, you can remove Custom CSS that hid the same parts.