Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kathy330/96b72ba7a37d400bb33ea1aada3e4d6a to your computer and use it in GitHub Desktop.
Save kathy330/96b72ba7a37d400bb33ea1aada3e4d6a to your computer and use it in GitHub Desktop.
Shopify - add cutom field on the sections in the customize page
Step0: determind which section you want to modify and inspect the section name
Step1: find the template you want to modify and add custom code to the schema
(e.g. tempalte -> page-sections-template.liquid)
{
"type": "text-and-image" #section name
"name": "Image with text"
"Settings":[ #adding new section in here
{
"type": "text"/"select"/"range"/"image_picker"
"id": "color_code" #id that use on the liquid template
"label": "Select Color" # label to display on the front end
}
]
}
Step2: fetch the code in side the section, so you need to modify the section liquid
(e.g. section -> page-block-rich-text.liquid)
using {{block.settings.id_you_set}}
in the previouse example will be
{{block.settings.color_code}}
Step3: save the changes, and preview on the customize
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment