Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I've recently updated pretier-plugin to the latest version, it seems that it found an issue within the header.liquid file for the Dawn theme.
I've checked the default dawn theme file and it's identical to mine, anyone had this before?
LINE 140:
Hi, I was getting the same problem when formatting liquid in the header. I think it was because liquid cannot be used to generate actual tags maybe? so having the opening {% straight after a < threw the error but I am no expert.
The way I fixed it was to just make a variable like so:
{% assign sticky_tag = 'div' -%}
{%- if section.settings.enable_sticky_header %}{% assign sticky_tag = 'sticky-header' %}{% endif %}
<{{ sticky_tag }} class="header-wrapper color-{{ section.settings.color_scheme }} gradient{% if section.settings.show_line_separator %} header-wrapper--border-bottom{% endif %}">
then the same error was thrown with the closing tag but it can be replaced with just:
</{{ sticky_tag }}>
Not sure if it is correct, but it worked for me... 😁
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025