Hello community, I hope to find an answer here. My theme doesn’t have a Custom Liquid Block in the Main Product or any other pages. Can someone of you help me add one? Grazie Mille, Thank you very much.
Hi @Igotlost . Here is the dawn theme custom-liquid.liquid file code:
https://github.com/Shopify/dawn/blob/main/sections/custom-liquid.liquid
Hi
Hi BrainStation23, thank you for your reply. I hope you had a good day so far. Would you mind directing me to the right path? If I use that code in a new .liquid page; will then show the Custom Liquid to the main product page as a Block or is more to be done? Sorry, it says I am a Shopify Partner but I am new to coding. Thank you
PREVIEW
Hi @Igotlost . We hope you’re doing great also.
For the query you’ve, you can add custom-liquid both as a block under main-product section or as a complete separate section. Like below:
If you add the code that we given to you in the previous reply it will be added as a separate section.
But if you want to add it as block, you need to do the followings:
-
go to main-product.liquid file
-
then add the following code in your schema settings array:
{
"type": "liquid",
"id": "custom_liquid",
"label": "Custom Liquid",
"info": "Add any info if you want else remove it"
}
- Then add the following code in your html markup with appropriate css:
{{ section.settings.custom_liquid }}
Hope this answers your query. Feel free to ask any question you’ve, we will try our best to assist.
Hi @Igotlost . Did you manage to solve it?
Sorry, I was busy. I just saw the message. Thank you for your time and help, Ciao
