How to Create a Custom Liquid Block Option For Your Shopify Theme

Themes that are not available in the Shopify Theme Store, or are otherwise not supported by Shopify, do not have a native Custom Liquid block option in the theme customization screen.

Follow the instructions below to add a Custom Liquid block option to any theme!

  1. Login to Shopify
  2. Click Sales Channels
  3. Click Online Store
  4. Click the three dot menu next to your theme
  5. Click Edit Code
  6. Click the Sections folder
  7. Click Add a new section
  8. Ensure liquid is the selected radio button
  9. In the File Name field, enter section-custom-liquid
  10. Click Done
  11. Remove the default code that appears in your new section-custom-liquid.liquid file
  12. Copy the following code:
  13. {{ section.settings.custom_liquid }}
    {% schema %}
    {
       "name": "Custom Liquid",
       "settings": [
       {
          "type": "liquid",
          "id": "custom_liquid",
          "label": "Custom Liquid",
          "info": "Add app snippets or other liquid code to create advanced customizations."
       }],
       "presets": [
       {
          "name": "Custom Liquid"
       }]
    }
    {% endschema %}
    	
  14. Paste the code into the blank section-custom-liquid.liquid file
  15. Click Save

Check out the video below for a walkthrough of the process:

Did this answer your question? Thanks for your feedback! There was a problem submitting your feedback. Please try again!