How can I make a transparent header only on the homepage in Refresh theme?

Topic summary

Goal: Make the Shopify Refresh theme header transparent only on the homepage, while keeping the sticky header (fixed on scroll) white.

Key clarifications:

  • Requirement: Homepage header transparent; sticky header white.
  • Earlier attempts made all pages’ headers transparent, which was not desired.

Access/setup:

  • Storefront was password-protected; password was shared to allow review.

Proposed solution:

  • Add conditional CSS in theme.liquid inside the that runs only on the homepage using: if template contains ‘index’.
  • Effect: Applies transparency exclusively on the homepage header, preserving a white sticky header.

Outcome:

  • The homepage-only transparent header approach was confirmed as working for the requester.

Additional notes/edge cases:

  • References were shared to guides for the Dawn theme; requester sought Refresh-specific implementation.
  • Another participant on the Taste theme reported the logo section still had a background while menu and sticky were affected; no detailed fix was provided, and the responder said the code works on their side. This suggests theme-specific differences may require targeted selectors.

Status:

  • Resolved for Refresh theme (homepage-only transparency achieved).
  • Partially unresolved for Taste theme (logo area background).
Summarized with AI on February 6. AI used: gpt-5.

Hello community,

I want to make header transparent on Refresh theme.

I tried some solutions here but it shows transparent header all other pages (which is look not optimized). I need transparency only in home page.

Thank you in advance!

URL: https://ezclean.ga/

@djawedbhn - it will look like this, is this the way you want?

Could you remove transparency from sticky header?

@djawedbhn - it will still show white as there is no color

@suyash1

If you mean

Header : transparent

Sticky header : white

Yes, that’s how want it.

@djawedbhn - your header is already white though, what is the password to view page?

Password : x

@suyash1

Password : x

@djawedbhn

Your store is password Protected. Please share your store front password!

Thanks!

Password: x

@dmwwebartisan

Password : x

@djawedbhn

Please check the following URLs for help

https://community.shopify.com/topic/1326851

https://jotting.com/shopify/how-to-make-dawn-theme-header-transparent

Thanks!

@Ninthony - Hello, I hope you are doing well.

I see your solution [header transparent] is helpfull in Dawn theme. Could you help me in Refresh theme

Hi @djawedbhn

You can try this code

  1. Go to Online Store-> Theme->Edit code
  2. Layout-> theme.liquid ->paste the below code before the tag as specified in the below screenshot.
{%- if template contains 'index' -%}
  
  {%- endif -%}

1 Like

THANK YOUUU !! Really apperciate your help

Hi - i have just tried using this code - it works but only on the menu items and sticky - the logo section is still showing with background please assist - using TASTE theme

this code works fine on my side