Is it possible to copy a section of a theme and give it a different name?

Is it possible to copy a section of a theme and give it a different name?

fad_su
Excursionist
14 0 3

I want to use two variants of some of the sections of my theme, like Image with Text, one with h1 heading and other with h2 heading. 

Can I make a copy of existing "Image with Text" section in my theme and create a copy of that section with a different name? If yes, how to make it appear with a different name in Theme Customizer interface?

fad_sumit_0-1738064977707.png

 

Replies 3 (3)
fad_su
Excursionist
14 0 3

Hey @Test91 

Worked like a charm! Many Thanks!

oscprofessional
Shopify Partner
16376 2441 3190

Hello @fad_su ,

Yes! You can duplicate a section and make it appear separately in the Theme Customizer.

Steps:

1 Go to Online Store → Themes → Edit Code.
2 Find sections/image-with-text.liquid.
3  Create a copy: Add a new section, e.g., image-with-text-h2.liquid.
4 Copy & paste the code from the original section.

Modify the section name in {% schema %}:

 

 

{
  "name": "Image with Text - H2"
}
"presets": [
  {
    "name": "Image with Text - H2",
    "category": "Text"
  }
]

 

 

Hire us | Pass Core Web Vital | B2B Wholesale Experts | Claim Your Free Website Review |
Connect with Us: WhatsApp | Skype: oscprofessionals-87 | Email: pallavi@oscprofessionals.com |
Custom Shopify SolutionsPrivate Apps, Theme Customization & SEO | Digital Marketing |
OSCP Apps: Discount Suite | Wholesale App | Bundle & Upsell | Shipping Discount | and more...
fad_su
Excursionist
14 0 3

Someone provided with the same solution with screenshot and I marked that as the Solution but the user deleted the post, not sure why.

 

Thanks for you response anyways. 🙂