Wanting to show all products on homepage using code

rachaelfinley
Visitor
1 0 0

Hi,

My current homepage is set up like this: https://shophotlava.com/

I'm using this code to populate my collections, however I don't want to show the categories of all products, I want to show the products themselves:

<div id="collection" class="row">
  <div class="span12">
    <!--<h1><span>{{ 'collections.list_collections.product_collections' | t }}</span></h1>-->
  </div> <!-- /.span12 -->
</div> <!-- /.row -->


<div class="row products masonry">
  {% for collection in collections %}
  {% unless collection.all_products_count == 0 or collection.handle == "frontpage" %}
  {% include 'collection-loop' %}
  {% endunless %}
  {% endfor %}
</div> <!-- /#collection.row -->

 

I'd like to show all products in the collection like this page, https://shophotlava.com/collections/all but I am not too familiar with Liquid code. Can somebody help me?

Reply 1 (1)

Michal17
Shopify Partner
835 73 175

Hi @rachaelfinley 

Hope you're having a great day!
You don't need to write any code before doing what you want to do. You can add the products to your homepage collection. This is the cleanest solution for you.

If you found this comment useful, hit the 'Like' and 'Accepted solution' buttons.