How to comment out liquid code in Shopify
Drive 20-40% of your revenue with Avada
Liquid template is popular for website developers in Shopify. Your online store wants to activate comment section on Liquid platform so that you can see customers’ questions or feedback. In today tutorial, we will introduce you to comment out liquid code.
Free 1:1 Shopify consultation & 30-day all-app trial FREE
- Shopify Plus Strategy and Consultation
- Personalized E-commerce Solutions
- Conversion Rate Boosting Techniques
- Inventory Management Hacks
Table of content
General information about Liquid
Liquid is an open-source templating language that support the functionality of HTML which you can use to upload dynamic content. Liquid is classified into objects, tags and filters. Objects indicates where Liquid shows content. Tags create the logic and control flow of a website. The output of a Liquid object which is separated by a slash can be changed with filters.
What is comment syntax
In general, tag markup does not allow to change the content of the text and is surrounded by a pair of curly braces and percent signs. There are two types of tags: comments and raw. Tags are usually used to apply logic to your template. You are able to use tags if/else
statements to have a single template send out emails in multiple languages. Comment and raw tags are used in a case statement.
How to comment out liquid code
This tutorial focuses on comment tag. Comment enables you to leave un-rendered code inside a Liquid template. It means that visitors can copy and edit comments. Any text within the opening and closing comment
blocks will not be generated and any Liquid code within not be executed.
For instance, you want to create blank space for visitors to leave their comments, then you use `` like this:
Input
Anything you put between {% comment %} and {% endcomment %} tags
is turned into a comment.
Output
Anything you put between tags
is turned into a comment.
Conclusion
In conclusion, comment tags help you to increase your website interface with customers. Visitors can leave their comments about your products or ask for further information, hence you would instantly answer these comments. We hope that the tutorial is helpful and if you have any difficulties, let’s us know and we will support you.