Shopify themes, liquid, logos, and UX
I Need help inn adding rich text block for each of my collection pages. For example I have Diamond, Ceramic and I have added Rich Text to the template but the same text goes across all pages. I just want the text to be about the specific page
Hello @RobbieBursAus
Rich text content to your collection pages using metafields in Shopify. Here's how you can achieve it:
1.Create Metafields:
- Go to "Products" > "Collections" in your Shopify admin.
- Select the collection for which you want to add unique content.
- In the collection settings, look for the newly created metafield (e.g., "Collection Description" or "Rich Text Content").- Enter your unique rich text content for this collection.
2.Display Metafield Content on Collection Pages:
- Edit your collection template file (e.g., collection-template.liquid).
- Use liquid code to retrieve and display the metafield content. Here's an example:
<div class="rich-text-collection">
{{ collection.metafields.custom.collection_description }}
</div>
Replace custom with the actual namespace and key of your metafield.
4.Save and Preview: Save your changes, and then preview your collection pages. Each collection should now display the unique rich text content you added using metafields.
I have followed all the steps. I am getting an awkward code on front end "{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"I am testing this rich text field","bold":true}]},{"listType":"unordered","type":"list","children":[{"type":"list-item","children":[{"type":"text","value":"Easy DOing","bold":true}]},{"type":"list-item","children":[{"type":"text","value":"Easy work","bold":true}]}]}]}"
I am using publisher theme and i entered the code at the bottom of "main collection product grid liquid"
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024