Shopify themes, liquid, logos, and UX
Hi all,
I'm coostumizing Dawn Theme, and I've ran into a problem:
I'd like to remove some of the options within "sort by"...
I only like to keep ascending price and decending price and remove the others...
My collection: to the page
anyone know how to do this?
Thanks in advance,
Andy
Solved! Go to the solution
This is an accepted solution.
Hello @larsvilhelmsson
Go to online store ---------> themes --------------> actions ------> edit code------->assets-----> component-facets.css
add this code at the end of the file.
.facet-filters__sort div:nth-child(1),.facet-filters__sort div:nth-child(2),.facet-filters__sort div:nth-child(3),.facet-filters__sort div:nth-child(4),.facet-filters__sort div:nth-child(7),.facet-filters__sort div:nth-child(8).facet-filters__sort div:nth-child(1), .facet-filters__sort div:nth-child(2), .facet-filters__sort div:nth-child(3), .facet-filters__sort div:nth-child(4), .facet-filters__sort div:nth-child(7), .facet-filters__sort div:nth-child(8) {
display: none;
}
result
If this was helpful, hit the like button and accept the solution.
Thanks
Please follow these steps:
1) Go to Online Store
2) Click edit code
3) Find your theme.liquid file
4) Add the following code in the bottom of the file above </body> tag
<style>
[value="manual"], [value="manual"] + label,
[value="best-selling"], [value="best-selling"] + label,
[value="title-ascending"], [value="title-ascending"] + label,
[value="title-descending"], [value="title-descending"] + label,
[value="created-ascending"], [value="created-ascending"] + label,
[value="created-descending"], [value="created-descending"] + label {
display: none;
}
</style>
This will hide all the sort by options except for ascending price and descending price.
Hope this helps 🙂
Kind Regards,
Futuremerce
★ Need help with your store? Feel free to reach out ★
https://www.futuremerce.com
hello@futuremerce.co
Hi @larsvilhelmsson , I hope you are doing well.
1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.liquid file
3. In theme.liquid, paste the below code before </body>
/* Hide all sorting options initially*/
select[name="sort-by"] option {
display: none;
}
/* Show only the Ascending price and Descending price options */
select[name="sort-by"] option[value="price-ascending"],
select[name="sort-by"] option[value="price-descending"] {
display: block;
}
If my reply is helpful, kindly click like and mark it as an accepted solution.
Thanks!
This is an accepted solution.
Hello @larsvilhelmsson
Go to online store ---------> themes --------------> actions ------> edit code------->assets-----> component-facets.css
add this code at the end of the file.
.facet-filters__sort div:nth-child(1),.facet-filters__sort div:nth-child(2),.facet-filters__sort div:nth-child(3),.facet-filters__sort div:nth-child(4),.facet-filters__sort div:nth-child(7),.facet-filters__sort div:nth-child(8).facet-filters__sort div:nth-child(1), .facet-filters__sort div:nth-child(2), .facet-filters__sort div:nth-child(3), .facet-filters__sort div:nth-child(4), .facet-filters__sort div:nth-child(7), .facet-filters__sort div:nth-child(8) {
display: none;
}
result
If this was helpful, hit the like button and accept the solution.
Thanks
Amzing! Thanks for the help, this worked!
Thanks a lot...!!!
Please hit the like button also.
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024