What's your biggest current challenge? Have your say in Community Polls along the right column.

How to create a child theme in a Shopify store?

How to create a child theme in a Shopify store?

Ch_Yousuf
Shopify Partner
1 0 0

How we can create a child theme in Shopify to avoid removing modifications in the parent theme code?
or any other solution related to updating the parent theme code.
thanks

Replies 2 (2)

Liam
Community Manager
3108 344 895

Hi Ch_Yousuf,

 

Shopify doesn't have a parent -> child theme system in the same way that other platforms like WordPress do. So when you're updating and modifying themes you'd take a different approach. One reliable way to manage updates safely is to use the Shopify GitHub integration to:

  • Automatically pull and push theme code from any organization or repository associated with your GitHub account
  • Connect one or more branches from a repository to easily develop and test new theme features or campaigns
  • Keep a theme up to date with commits to a branch, and track edits made in the Shopify admin, including the code editor and theme editor
  • Connect branches to unpublished or published themes

To ensure that changes that you make are not affecting your live store, you'd edit a duplicate of the theme and then once you're ready you can publish that duplicate. 

 

Hope this helps!

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

fredrikpersson
Shopify Partner
2 0 0

Hi, I though I should look into this too. I'm using the free Ride theme from Shopfiy. Is the above approach the best way to keep my modifications to the theme, while still having access to the updates Shopify rolls out every now and then. Because when they do, my changes are obviously overwritten.

Thanks