Shopify themes, liquid, logos, and UX
I want to increase the number of blog post columns which is currently 3 columns I want it to be 5.
For this website: https://marketingpropertee.com/blogs/news
Someone from the Shopify community recommended inserting this code in the theme.liquid
<style> .page-content { max-width: unset !important; } @media only screen and (min-width: 769px) { .medium-up--one-third { width: 20% !important; } } </style>
and replacing this code
I followed all the instructions and it worked but it is changing all grids from the website I only want it to change for the blog page.
Solved! Go to the solution
This is an accepted solution.
Hi @Ammzish
do you mean like this right?
If it is check this one.
From your Shopify admin dashboard, click on "Online Store" and then "Themes".
Find the theme that you want to edit and click on "Actions" and then "Edit code".
In the "Assets" folder, click on "base.css, style.css or theme.css" file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:
div#shopify-section-template--15625122676815__main .grid.grid--uniform {
display: flex;
flex-wrap: wrap;
}
@media only screen and (min-width: 769px) {
div#shopify-section-template--15625122676815__main .medium-up--one-third {
max-width: 20%;
}
}
And Save.
Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
This is an accepted solution.
Hi @Ammzish
1. In your Shopify Admin go to online store > themes > actions > edit code
2. Find Asset > theme.css and paste this at the Top of the file:
@media only screen and (min-width: 769px) {
.medium-up--one-third {
width: 20%!important;
clear: none!important;
float: right;
}
}
Hi @Ammzish
1. In your Shopify Admin go to online store > themes > actions > edit code
2. Find Asset > theme.css and paste this at the bottom of the file:
@media only screen and (min-width: 769px) {
.medium-up--one-third {
width: 20%!important;
clear: none!important;
float: right;
}
}
Thank you for the reply, I pasted the code you provided and it did nothing. and I want to let you know that the code I mentioned above I removed it from the theme.liquid and I replace back the code to (.grid--uniform .medium-up--one-third:nth-of-type(3n+1)) do I still need to replace it to 5n+1?
This is an accepted solution.
Hi @Ammzish
1. In your Shopify Admin go to online store > themes > actions > edit code
2. Find Asset > theme.css and paste this at the Top of the file:
@media only screen and (min-width: 769px) {
.medium-up--one-third {
width: 20%!important;
clear: none!important;
float: right;
}
}
Thank you, I pasted the code at the top of the file and it worked. However, it is changing the entire website grid. I tried the same code someone else provided for a specific section, and it only worked for the blog page.
div#shopify-section-template--15625122676815__main .grid.grid--uniform {
display: flex;
flex-wrap: wrap;
}
@media only screen and (min-width: 769px) {
div#shopify-section-template--15625122676815__main .medium-up--one-third {
max-width: 20%;
}
}
Hi @Ammzish
The above code will work for everyone, and the below code will only work for the news blog page.
@media only screen and (min-width: 769px) {
div#shopify-section-template--15625122676815__main .medium-up--one-third {
width: 20%!important;
clear: none!important;
float: right;
}
}
Let me know if you need further assistance!
This is an accepted solution.
Hi @Ammzish
do you mean like this right?
If it is check this one.
From your Shopify admin dashboard, click on "Online Store" and then "Themes".
Find the theme that you want to edit and click on "Actions" and then "Edit code".
In the "Assets" folder, click on "base.css, style.css or theme.css" file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:
div#shopify-section-template--15625122676815__main .grid.grid--uniform {
display: flex;
flex-wrap: wrap;
}
@media only screen and (min-width: 769px) {
div#shopify-section-template--15625122676815__main .medium-up--one-third {
max-width: 20%;
}
}
And Save.
Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
@Made4uo-Ribe Thank you for your help, Yes I want it exactly like this. I pasted the code and it is not working.
@Made4uo-Ribe I pasted on the top of theme.css and it worked thank you so much for helping.
Welcome, you can also paste the code on the custom.css in the customize theme editor.
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025