Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
add product grid section from collection page to homepage on refresh theme. I need to add the full section with filter and all to my homepage. i tried to add a new section with same code from gird section and it was not showing in the dashboard.
This is Amelia from PageFly - Landing Page Builder App
To add a product grid section from the collection page to your homepage in the Refresh theme, including filters, follow these steps:
Create a New Section:
Add Code to the New Section:
{% schema %} { "name": "Home Collection Product Grid", "settings": [ { "type": "collection", "id": "collection", "label": "Collection" }, { "type": "number", "id": "products_per_page", "label": "Products per page", "default": 12 } ], "presets": [ { "name": "Home Collection Product Grid" } ] } {% endschema %} <div class="section"> <div class="grid"> {% paginate collection.products by section.settings.products_per_page %} {% for product in collection.products %} {% include 'product-grid-item', product: product %} {% endfor %} {% endpaginate %} </div> </div>
Include Filters:
Add the Section to the Homepage:
Test and Adjust:
Hope that my solution works for you.
Best regards,
Amelia | PageFly
Please let me know if it works by giving it a Like or marking it as a solution!
➜ Optimize your Shopify store with PageFly Page Builder (Free plan available)
➜ Weekly updated Shopify tutorials on YouTube
All features are available from Free plan. Live Chat Support is available 24/7.
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By 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, 2024