Step 1: Modifying the Shopify Theme
1. Navigate to Online Store > Themes or go to the link https://your-shopify-store/admin/themes
2. Click the drop-down menu labelled Actions on the Live Theme, then click the Edit Code.
3. Open the collection-template.liquid file
4. Perform a search within the code for
{{ collection.description }}
5. Replace it with the following line of code:
{% assign descriptions = collection.description | split: "<!-- split -->" %}
{% assign short_desc = descriptions[0] %}
{% assign long_desc = descriptions[1] %}
6. Simply add the following to call the first portion of the description before the
<!-- split -->
:
{{ short_desc }}
To display the second part of the description entered after the
<!-- split -->
use the following code:
{{ long_desc }}
Splitting the Collections Description
Use the left-hand menu to navigate to: Products > Collections.
Select your desired collection to edit.
Click the Show HTML button the description fields WSYWIG editor. Please note that the split code must be entered in the HTML editor to save correctly.
Enter the content that will form the short description, then the split tag, followed by the longer description as demonstrated below.
<p>text for short description</p>
<!-- split -->
<p>text for long description</p>
0 comments