Date #5 · 1 Min. read
4 lessons from building Shopify Custom Themes
Four practical lessons from our Shopify projects that make custom themes more stable, flexible and easier to maintain.
First published in the HUX Date newsletter.
-
Backups are not optional
This date is about to get a little nerdy. For almost all of our projects, we build Shopify themes from scratch. A few simple rules have proven especially useful.
The first one: make backups. Shopify stores everything in the cloud and provides version history. But as soon as several people work on the same store, changes can quickly overwrite each other.
Daily backups help prevent exactly that kind of chaos.
-
Use metafields properly
Metafields are often underestimated, but they are extremely versatile. We use them for things like individual content on product pages or flexible checkout buttons.
They can be used across products, collections and pages, giving a theme much more flexibility.
-
Avoid hardcoding
A common mistake is writing fixed terms directly into the code. Shopify can use variables to display the correct wording automatically in the selected language.
Hardcoded text stays fixed and will not be translated automatically in a multilingual store. Variables make translations easier and help avoid errors.
-
Custom classes create flexibility
Every area of a theme, from sections to sliders, should have its own class.
This makes future changes much easier. More importantly, it reduces the risk of changing one part of the shop and accidentally affecting another.