๐๐จ๐ฐ ๐ญ๐จ ๐๐ซ๐๐๐ญ๐ ๐๐ฎ๐ฌ๐ญ๐จ๐ฆ ๐๐๐๐ญ๐ข๐จ๐ง๐ฌ ๐ข๐ง ๐๐ก๐จ๐ฉ๐ข๐๐ฒ?
Creating custom sections in Shopify allows you to add unique content and functionality to your store beyond the standard theme options. Hereโs a breakdown of the process:
๐. ๐๐๐๐๐ฌ๐ฌ ๐๐ก๐๐ฆ๐ ๐๐จ๐๐:
a. Go to your Shopify admin panel.
b. Navigate to โOnline Storeโ > โThemesโ.
c. Select the theme you want to edit and click โActionsโ > โEdit codeโ.
๐. ๐๐ซ๐๐๐ญ๐ ๐ญ๐ก๐ ๐๐๐๐ญ๐ข๐จ๐ง ๐ ๐ข๐ฅ๐:
a. Inside the โsectionsโ folder, create a new Liquid file with your desired section name (e.g., โcustom-section.liquidโ).
๐. ๐๐๐๐ข๐ง๐ ๐ญ๐ก๐ ๐๐๐๐ญ๐ข๐จ๐ง ๐๐๐ก๐๐ฆ๐:
a. Within the Liquid file, start by defining the section schema using JSON. This specifies the sectionโs name, settings, and presets.
b. Essential properties include:
i. name: A unique identifier for your section.
Get Rajeev Kumarโs stories inย yourย inbox
Join Medium for free to get updates fromย thisย writer.
ii. settings: An array defining any customizable options within the section (e.g., text fields, image upload).
iii. presets: An array defining different variations of the section (optional).
๐. ๐๐๐ฏ๐๐ฅ๐จ๐ฉ ๐ญ๐ก๐ ๐๐๐๐ญ๐ข๐จ๐ง ๐๐จ๐ง๐ญ๐๐ง๐ญ:
a. After the schema, write the Liquid code to build the actual section content. This involves using Liquid tags and logic to display the desired elements.
๐. ๐๐๐ฌ๐ญ ๐๐ง๐ ๐๐๐ ๐ญ๐ก๐ ๐๐๐๐ญ๐ข๐จ๐ง:
a. Go to โCustomize themeโ in the theme editor.
b. Under โSectionsโ, click โAdd sectionโ.
c. Search for your newly created section and add it to the desired page template.
d. Save your changes and preview the storefront to ensure everything works as intended.
For more info..here is ๐๐ก๐จ๐ฉ๐ข๐๐ฒ ๐๐จ๐๐ฎ๐ฆ๐๐ง๐ญ๐๐ญ๐ข๐จ๐ง: ๐
https://shopify.dev/docs/themes/architecture/sections
#rndexperts Shopify #development #customsections #Shopify_sections #liquidfile #eCommerce #hiredeveloper







