Anyone know how I can increase the featured collection to be 6 in a row for computers? And so it will be two rows for mobile by 3 per line there? Working in Refresh theme and want this for my start page
Hello there
To increase the number of featured collections displayed per row on desktop and mobile youâll need to make changes to the themeâs code
In the left-hand navigation, click on âSectionsâ and then select "index.liquid
Look for the following code block:
This code block is used to determine the number of collections to display per row based on the value set in the theme editor. Currently, the theme is set to display up to 4 collections per row on desktop.
- To increase the number of collections displayed per row, you can add a new case statement for â6â, like this:
{% case section.settings.collections_per_row %}
{% when '6' %}
{%- assign grid_item_width = 'medium--one-sixth large--one-sixth' -%}
{% when '4' %}
{%- assign grid_item_width = 'medium--one-half large--one-quarter' -%}
{% when '3' %}
{%- assign grid_item_width = 'medium--one-third large--one-quarter' -%}
{% else %}
{%- assign grid_item_width = 'medium--one-half large--one-quarter' -%}
{% endcase %}
This new case statement will set the grid item width to âmediumâone-sixthâ and âlargeâone-sixthâ for 6 collections per row on desktop.
- To adjust the number of collections displayed per row on mobile, you can add a new case statement like this:
{% case section.settings.collections_per_row %}
{% when '6' %}
{%- assign grid_item_width = 'medium--one-half large--one-sixth' -%}
{% when '4' %}
{%- assign grid_item_width = 'medium--one-half large--one-quarter' -%}
{% when '3' %}
{%- assign grid_item_width = 'medium--one-third large--one-quarter' -%}
{% else %}
{%- assign grid_item_width = 'medium--one-half large--one-quarter' -%}
{% endcase %}
hope this helps!
Hello @Kingstone
You can try following this way:
-
Go to Online Store â Theme â Edit code. https://prnt.sc/GXrfrkb50e-e
-
Open your âfeatured-collection.liquidâ in the Sections folder. https://prnt.sc/-JbhA28GJS2Z
-
Find / âidâ: âcolumns_desktopâ, / set 6 for âmaxâ:
- Find / âidâ: âcolumns_mobileâ, / add:
,
{
"value": "3",
"label": "3 columns"
}
in here:
- Open your base.css in the Assets folder. Paste the below code at the end of the file.
@media screen and (max-width: 749px){
.collection .grid--3-col-tablet-down .grid__item {
width: calc(33.33333% - var(--grid-mobile-horizontal-spacing));
max-width: calc(33.33333% - var(--grid-mobile-horizontal-spacing) /2);
}
}
Result: https://prnt.sc/T_QZRR3fS9Ri + https://prnt.sc/lhy3eGMjPIZA
Best regards,
GemPages Support Team
Hey! Do not have any index.liquid only a index.json. Cant find that code anywhere, you know if it is called diffrent on Refresh?
Thanks for reply! @GemPages & @EcomGraduates
I wrote wrong but it almost work, i meant for âcollection listâ, how do i change this code so it will display correct, now it shows 4 on first line and 2 on second for mobile
@media screen and (max-width: 749px){
.collection .grid--3-col-tablet-down .grid__item {
width: calc(33.33333% - var(--grid-mobile-horizontal-spacing));
max-width: calc(33.33333% - var(--grid-mobile-horizontal-spacing) /2);
}
}
Hi @Kingstone
Can you give me your page URL (with pass if your store password is enabled), so I can check it?
This code still results in 3 products per line on mobile in my theme. https://prnt.sc/rQZI5NTcZS2_
Kind & Best regards,
GemPages Support Team


