Skip to content

Instantly share code, notes, and snippets.

@cameroncowden
Created September 28, 2022 18:01
Show Gist options
  • Save cameroncowden/3062203950f30b542a2893a6c7647512 to your computer and use it in GitHub Desktop.
Save cameroncowden/3062203950f30b542a2893a6c7647512 to your computer and use it in GitHub Desktop.
Show products from a specific collection in Shopify
<!-- the collection handle we are pulling from is 'new'--->
{% assign collection = collections['new'] %}
{% for product in collection.products | limit: 4 %}
<!-- the 'product-block' is specific to your theme, it is html for a grid item of a product, could be called product-grid-item, grid-product, etc --->
{% render 'product-block', product: product %}
<!-- product --->
{% endfor %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment