I need to display three featured products on each collection page. I want these products for be specifically from that collection and not the same products displayed across all collection pages, which is all I have been able to create so far!
I can’t work out how to create this so any advice appreciated.
This is Richard at PageFly - Shopify Advanced Page Builder app.
To display three featured products on each collection page that are specifically from that collection, you can use Liquid programming and Shopify’s built-in features. Here’s a step-by-step guide:
1. Create a Liquid Snippet:
Go to your Shopify admin.
Navigate to Online Store > Themes.
Click the Actions menu for your active theme and select Edit code.
Create a new snippet named featured_products.liquid.
2. Write the Liquid Code:
Paste the following code into the featured_products.liquid snippet:
@MTSport To display three featured products in a collection page, please follow the below steps.
Go to “Settings” → “Custom data” → “Collections”.
Add a metafield for the collection with product type.
Then, go to “Online Store” and click the action button from the current theme and then select “Edit code”.
Create a new section with the reference of the featured-collection.liquid section. Use the created metafield values to display the products on the collection page.
Once created the section, design it as per your need.
Don’t hesitate to reach us through mail for further assistance.
@MTSport Happy to hear that our solution was helpful for you. It would be helpful for others too, if you mark it as an “Accepted” solution and also support us by clicking “Like”. Kindly don’t hesitate to contact us for any other helps.