A Shopify store owner created a sticky transparent header that overlaps slideshow images on the homepage but now causes content overlap issues on all other pages.
Primary Goal:
Make the header transparent only on the homepage while keeping it solid/colored on other pages, without manually fixing each page.
Initial Code:
The user implemented transparency using custom CSS in base.css and JavaScript in theme.liquid that adds/removes classes based on scroll position.
Solutions Provided:
ZestardTech suggested adding conditional code to theme.liquid using {% if template != 'index' %} to apply different header styles based on page type
Moeed recommended adding JavaScript above the </body> tag to detect homepage and apply transparency conditionally
Current Status:
Partially resolved - the desktop implementation works, but mobile display has issues. The user attached screenshots showing the header appearing correctly on desktop but not rendering properly on mobile devices. They’re awaiting further assistance from ZestardTech to fix the mobile responsiveness issue while maintaining the desired transparency behavior (transparent on homepage, solid color on other pages).
Summarized with AI on November 19.
AI used: claude-sonnet-4-5-20250929.
This is not working, please explain properly. Firstly where is the homepage coding? Theme.liquid?
Also let me try and explaining to you what I have. As of now I have a sticky transparent header then when scrolled down changes the the transparency to colour. Which I want on the home page.
On all the other pages I want I want to be sticky only but without the transparency.