Widgets not appearing due to codes

Topic summary

A user encountered an issue where custom CSS code designed to differentiate the homepage header from other pages was preventing widgets from displaying across their entire Shopify site (bhlclothing.com).

The problematic code contained:

  • Conditional logic to apply different header background colors based on page template
  • Reversed/garbled text that appeared to be encoding errors

Resolution steps:

  • Another user provided corrected code syntax to fix the conditional statements
  • A third participant confirmed that after the code was updated, widgets are now displaying normally across all pages

Current status: The issue appears to be resolved, with widgets functioning properly. The final responder asked if any additional help is needed, suggesting the problem has been successfully addressed.

Summarized with AI on November 3. AI used: claude-sonnet-4-5-20250929.

Hello, I am currently using this code to have my header customized and become different from homepage. However, putting this code prevents my widgets from showing in my website (for all pages). I want them back. Can someone assist me please? Here’s the code and my url (bhlclothing.com). Thank you!

{% if template == 'index' %} .shopify-section-group-header-group.section-header.shopify-section-header-sticky.scrolled-past-header sticky-header.header-wrapper { background-color: #181818!important; } {% else %} .shopify-section-group-header-group.section-header.shopify-section-header-sticky.scrolled-past-header sticky-header.header-wrapper { background-color: #ffffff !important; } {% endif %}

Please try to update the code to this and check again

{% if template == 'index' %}

{% else %}

{% endif %}

Hi @glucinth

I saw that you already added the code and the widgets still show normally

Do you still need help?

Best,

Daisy