How To: Add a Theme Enhance section to your theme
Completion time: less than 5 minutes
Difficulty level: easy
Coding required: none
Theme Requirements: Theme 2.0 Required? yes. Learn how to upgrade your theme
Add Theme Enhance global assets to your theme
Note: this step only needs to be completed once per theme
In the code editor for the theme you are working on, create a new snippet in the snippets folder called
'lightly-slideshow-assets.liquid'
Click the button below to copy the file contents to your clipboard
- Paste the contents of your clipboard into the
'lightly-slideshow-assets.liquid'
file that you created in the previous steps - Save the
'lightly-slideshow-assets.liquid'
file - In your
'theme.liquid'
file, in the opening <head> tag, paste the following line of code{% render 'lightly-slideshow-assets' %}
. Ideally, place this right before the {{ content_for_header }} tag.
Add the Theme Enhance section to your theme
This step needs to be completed for each section that you need to use
In your Shopify admin, on the theme you wish to add the Theme Enhance section to, navigate to the code editor
In the Shopify code editor, add a new file in the Sections folder by clicking 'Add a new section'. In the add a new section dialog, type the name of the section you are installing (e.g. `theme-enhance-q1.liquid`) and press 'Create section'.
In the newly created file from the previous step, erase the entire contents. Ensure no code is left from the code created by Shopify.
Copy the source code for the Theme Enhance section you would like to install on your home page
With the contents of the newly created file completely empty, paste the contents of the Theme Enhance section source code from step 1 into the newly created section file (`theme-enhance-q1.liquid`).
Click save. Exit the code editor. You are now ready to start merchandising and using your Theme Enhance section.