How can I create a transparent header for Publisher Theme?

Hi,

I am looking to make my header transparent for my Publisher Theme.

Site: www.aurabyangelo.com

Code Request: Make the header background transparent (for desktop AND mobile) without it affecting my announcement bar.

Thank you!

-A

Hi @kritikozzz

You can do that by adding this code in your theme.liquid file, before tag in Online store > Themes > Edit code

{% if template == 'index' %}

{% endif %}

1 Like

Worked! Thank you!

Question - is there a way to make it transparent across all pages? Right now its only on my homepage, but the white background appears on shop and contact etc.

Hi @kritikozzz

Please update code to this

{% if template == 'index' %}

{% endif %}

This did not work unfortunately

Did you update previous code with new one and save file?

Yes

Wait, now it works! Took a second to refresh, thank you!

1 Like

Glad I could help. Have a great day

I did notice my announcement bar is a bit clipped on the bottom… the text is no longer centered in the black frame? Could the code we added adjust this?

Hey, my mobile version of site is not letting me make the header transparent on just the home page. Can you help?

Hi @Popularitems

Please send me your store URL so I can check and help you

Popularitems.com thank you so much

Please go to your Online Store > Themes > Edit code > open theme.scss.liquid file, find and remove this code around line 6925 of this file

@media screen and (max-width: 769px) {
    .header-section .header-container {
      position: initial; } }

It’s not there

You can add this code to your theme.liquid file after to solve it


thank you but now on the product page, and search page. It’s trying to be transparent and I do not want it to be. Please check

Code updated

{% if template == 'index' %}
 
{% endif %}