Shopify themes, liquid, logos, and UX
Hello! I'm trying to change the number of collections shown per row in a collection list on the homepage in desktop view. Currently, it defaults to 5 per row, and I'd like it to show 3 per row so that the rows are even. Is there a way to do this in the code?
Thanks for your help!
Solved! Go to the solution
This is an accepted solution.
I figured it out! If anyone else has this issue, the solution I found is below.
Section > collection.list.liquid
Edit Row 12 from
{% when '5' %}
{%- assign collection_item_width = 'small--one-half medium--one-third post-large--one-fifth' -%}
{%- assign collection_width = 235 -%}
to
{% else %}
{%- assign collection_item_width = 'small--one-half medium--one-third post-large--one-third' -%}
{%- assign collection_width = 235 -%}
I tried this, but then it throws the mobile view off..
With one collection list, the mobile view shows two on each row seamlessly.
I'm wondering if there is way to have even rows on both desktop and mobile view.
This is an accepted solution.
I figured it out! If anyone else has this issue, the solution I found is below.
Section > collection.list.liquid
Edit Row 12 from
{% when '5' %}
{%- assign collection_item_width = 'small--one-half medium--one-third post-large--one-fifth' -%}
{%- assign collection_width = 235 -%}
to
{% else %}
{%- assign collection_item_width = 'small--one-half medium--one-third post-large--one-third' -%}
{%- assign collection_width = 235 -%}
User | RANK |
---|---|
157 | |
135 | |
78 | |
70 | |
68 |
Explore the 30-30-30 rule, a dynamic social media strategy for new businesses. Learn how t...
By Trevor Sep 20, 2023Discover how to leverage the often overlooked footer of your ecommerce site to gain custom...
By Skye Sep 15, 2023In this blog, we’ll be shining a light on Shopify Partners, Experts, and Affiliates. Who a...
By Imogen Sep 13, 2023