How to comment out liquid code on shopify

To comment out liquid code in Shopify, you can use the {% comment %} and {% endcomment %} tags. Anything between these tags will be ignored by the server and won’t show up on the front-end of your Shopify site. This is a handy way to disable specific parts of your code temporarily, without having to delete it altogether.

Let’s say we have a form, in that form we don’t want the phone field to exist.

image
How to comment out liquid code on shopify 3

Head to the backend and find the code you want to comment out, for instance, contact-form.liquid template. Save and refresh.

image 1
How to comment out liquid code on shopify 4

Video Guide

guest

0 Comments
Inline Feedbacks
View all comments
Scroll to Top