Editing theme code
- Shopify Partner Directory
- Shopify documentation on theme structure and extending themes
- Shopify developer documentation on Liquid
- Shopify documentation on duplicating themes
- Shopify documentation on theme support
- Shopify documentation on uploading theme images
- Shopify admin Themes
- Shopify documentation on theme versions
- Shopify documentation on customizing themes
- Shopify documentation on finding theme support
Edit Align theme code
Section titled “Edit Align theme code”Editing code lets you make detailed changes to your Align storefront on Shopify. Theme files can contain Liquid, HTML, CSS, JSON, and JavaScript.
Only edit code when you are comfortable with HTML and CSS and have a basic understanding of Liquid. Use the Align theme editor when it can achieve the change you need.
For help with Align-specific questions, start with Company XYZ support. If you need a custom feature and do not have experience with HTML, CSS, and JavaScript, Company XYZ support can help you identify the appropriate next step.
Before you customize Align
Section titled “Before you customize Align”Complete these steps before making code changes:
-
Duplicate your theme to create a backup.
You can discard changes and start again from this copy if needed.
-
Review the level of support available for your theme.
-
Learn the requirements and best practices for uploading images
Edit your theme code
Section titled “Edit your theme code”-
From your Shopify admin, go to Online Store > Themes
-
Find the Align theme copy you want to change, click … > Edit code.
-
Select a file from the directory on the left to open it in the editor.
-
Make your changes. You can open and edit multiple files at once.
Modified files display a dot next to their name, helping you track where you have made changes.
Roll back an older theme version
Section titled “Roll back an older theme version”If you need to revert a change, you can roll back individual .liquid files to an earlier saved version.
Files in the Assets folder, including theme.scss.liquid and theme.js, do not keep previous edited versions. Keep a separate copy of changes to these files if you may need to recover them.
-
From your Shopify admin, go to Online Store > Themes
-
Find the Align theme copy you want to edit, click … to open the actions menu, and then select Edit code.
-
Under Templates, select a recently edited
.liquidfile. -
Select Current version below the file name.
-
Use the drop-down menu to choose an earlier version.
Selecting a datestamp restores that saved version.
-
Optional: Select Preview store to confirm that the issue is fixed.
Use Theme Check
Section titled “Use Theme Check”Theme Check provides immediate feedback while you write code, so you can identify issues before they affect your live Align storefront.
It can identify issues such as:
- Parser-blocking scripts that can slow down a storefront.
- Translation-file inconsistencies, including missing translation keys or translations that do not match a locale file.
- Missing templates.
A red line appears beneath code with an identified error. Hover over the highlighted line to view its details.
Find theme customization tutorials
Section titled “Find theme customization tutorials”Theme code customization tutorials can guide you through changes to specific pages or features. Choose tutorials that match your theme architecture version; learn how to identify your theme architecture version
Get help with customizations
Section titled “Get help with customizations”For Align-specific guidance, contact Company XYZ support. Company XYZ supports Align and can help you understand theme-related options before you make changes.
Shopify support resources also describe where to find support for your theme and additional resources for theme support. Use Shopify support for Shopify-admin, account, billing, or other platform-owned concerns.
Usage notes
Section titled “Usage notes”- Work from a backup. Duplicate your Align theme before every code customization session.
- Use the right tool. Prefer the theme editor when it can provide the result without code changes.
- Verify changes. Preview the store after editing or restoring a file to confirm the expected result.
- Treat asset edits carefully. Keep your own copy of changes to files in Assets, since earlier edited versions are not available there.