Removing some "sort by" options

Solved

Removing some "sort by" options

larsvilhelmsson
Excursionist
22 0 7

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 

Screenshot 2024-08-23 at 12.06.56.png

Accepted Solution (1)

Rahul_dhiman
Shopify Partner
451 91 93

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
16.png

If this was helpful, hit the like button and accept the solution.
Thanks

Was I helpful?

Buy me a coffee



Want to modify or custom changes or bug fix on store . Or Need help with your store? Or -Want Complete Storefront
Email me -rahul@prowebcoder.com - Skype: live:dhiman.639
Checkout Some Free Sections Here
Mobile:- +91 62390-46167

View solution in original post

Replies 5 (5)

Futuremerce
Shopify Partner
12 8 6

Hi @larsvilhelmsson 

 

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

steve_michael2
Excursionist
82 11 17

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!

Crafting exceptional online experiences with innovative design and technology.

Rahul_dhiman
Shopify Partner
451 91 93

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
16.png

If this was helpful, hit the like button and accept the solution.
Thanks

Was I helpful?

Buy me a coffee



Want to modify or custom changes or bug fix on store . Or Need help with your store? Or -Want Complete Storefront
Email me -rahul@prowebcoder.com - Skype: live:dhiman.639
Checkout Some Free Sections Here
Mobile:- +91 62390-46167
larsvilhelmsson
Excursionist
22 0 7

Amzing! Thanks for the help, this worked! 

Rahul_dhiman
Shopify Partner
451 91 93

Thanks a lot...!!!
Please hit the like button also.

Was I helpful?

Buy me a coffee



Want to modify or custom changes or bug fix on store . Or Need help with your store? Or -Want Complete Storefront
Email me -rahul@prowebcoder.com - Skype: live:dhiman.639
Checkout Some Free Sections Here
Mobile:- +91 62390-46167