Transparent header home page only (and some more)

Topic summary

Request to make the Shopify home page header transparent with white text/icons and control sticky behavior (appear on scroll up with white background/black text; hide on scroll down). A solution was suggested: add a conditional block for the home page in theme.liquid after the tag using {% if template == ‘index’ %} … {% endif %}. The poster confirmed this addressed the header change.

New issue: the “Add to cart” button is not working. Diagnosis indicated a problem in the theme’s script, which is encrypted, preventing direct fixes. Recommendation: contact the theme or app support for resolution. A screenshot was provided to illustrate the script issue.

Key terms:

  • theme.liquid: Shopify’s main layout file where global code is added.
  • template ‘index’: the home page template, allowing page-specific changes.
  • Sticky header: a header that stays visible during scrolling.

Outcome and status:

  • Header transparency on the home page appears resolved.
  • Add-to-cart malfunction remains unresolved; support contact advised.
  • Poster cannot reach support, so the issue is open/ongoing.
Summarized with AI on December 16. AI used: gpt-5.

This is going to be a big request but i need help with:

  1. making my header transparent on home page only and turning header text and icons white.

  2. making the sticky header appear when scrolling up (white background with black text)

  3. making the sticky header disapear when scrolling down
    https://795000-4b.myshopify.com/

Hi @dodo06

Please add this code to theme.liquid file, after in Online Store > Themes > Edit code

{% if template == 'index' %}

{% endif %}
1 Like

no flipping way ive been trying to do that the whole day, you are a legend,

but i have one last problem with my store, add to cart button is not working, i would appreciate if you could help me

Let me check

1 Like

There is an issue with your theme script, and script is encrypted, so I recommend you contact theme or app support so they can help you.

I am unable to contact them, could you please try to fix it? i will buy you coffe, please:/