Remove Sort Options - Debut Theme

themellowberry
Excursionist
15 0 10

Hi! 

I'm looking to remove some of the sort options from my site (keeping only price & featured) but haven't been able to do so with the codes i've found on other discussion threads...Appreciate if someone could help me out on this!! I'm using the Debut theme! My site is www.themellowberry.myshopify.com

Thanks a bunch!

 

 Screenshot 2021-01-15 at 1.32.38 AM.png

0 Likes
Ninthony
Shopify Partner
1975 296 784

You can add this to the bottom of your theme.scss.liquid file in your assets folder:

option[value="best-selling"], option[value="title-ascending"], option[value="title-descending"], option[value="created-ascending"], option[value="created-descending"] {
    display: none;
}

 

That'll hide everything but featured and Price Low to High and Price High to Low 

If my solution helped you, please like it and accept it as the solution!
If you'd like to make any edits to your store, please send me a personal message and we can discuss what you'd like to accomplish :D
themellowberry
Excursionist
15 0 10

Thank you for this! It works! However, when i enter the product page it still displays "Alphabetically, A-Z" despite it not being in the options. Is there a way to change that?Screenshot 2021-01-15 at 1.55.14 AM.png

0 Likes
Ninthony
Shopify Partner
1975 296 784

That seems to be the default sorting for collections/all -- to combat this you can go to your collections and create a collection called "All" and automatically include products if their price is greater than 0. That will replace that collection and give you the option to change the way that it's sorted so you can set Manual as the default, which would be "Featured"

If my solution helped you, please like it and accept it as the solution!
If you'd like to make any edits to your store, please send me a personal message and we can discuss what you'd like to accomplish :D
0 Likes
MS-WEB-DESIGNER
Shopify Partner
2816 176 474

Dear @themellowberry 

Hope the following suggestions will help you

  • Take backup of your theme
  • From your Shopify admin, go to Online Store > themes
  • Locate your current theme and then click Actions > Edit code
  • After that in the Assets folder, click to open your theme.scss.liquid file
  • Go to the very bottom of this file and paste the following code:

 

/* Start */
.filters-toolbar__input option[value="best-selling"], .filters-toolbar__input option[value="title-ascending"], .filters-toolbar__input option[value="title-descending"], .filters-toolbar__input option[value="created-ascending"], .filters-toolbar__input option[value="created-descending"] { display: none !important; }
/* End*/

 

  • Ensure that the code was copied exactly from this guide and pasted correctly, making sure no characters or symbols are missing.
  • Save and check your theme by refreshing it.
  •  
0 Likes