Why am I getting “Liquid syntax error: Unknown tag”?

That error, e.g. Liquid syntax error: Unknown tag ‘endif’, almost always means the block tags do not match up. A common cause is a stray {% endif %} with no opening {% if %}, an {% endfor %} closing the wrong loop, or a typo in the tag name. We walk the template, fix the nesting so every open tag has a matching close, and re-validate the whole file so the parser stops complaining.

Kishan Savaliya
Kishan Savaliya
Adobe Certified Magento Commerce Developer
Ahmedabad [IN]working hours, replies within four hours
When do you need it

Read personally. Never shared. Or email the brief.

More on shopify liquid bug fixing

Need it fixed, not just explained?

Send the brief with your store URL; the written quote comes back within 24 hours.