customize sort by pull-down, Brooklyn Theme.

New Member
2 0 0

I'd like to remove half of the sort-by options in the customer pulldown  that don't apply to my products and customers. I need basic help. I know where the theme code files are, but I don't know the syntax. Thanks in advance!

0 Likes
Shopify Staff
Shopify Staff
381 45 82

Hey, sistersceramics.

My name is Lizzy, I'm a Guru on the support team at Shopify.

I took a look at the theme code for Brooklyn and found an area where you can remove the sort by options. If you go to Online Store>Themes>Actions>Edit Code (on the theme you're editing) it will open up the theme editor. From here you'll want to click on the Snippets folder. In there you'll find a file called collection-sorting.liquid. This file holds all of your sort by options. 

I suggest commenting out the options you'd like to remove. This way they will still be there if you want to add them back in future. You can do this be enclosing the entire line of the option between {% comment %} and {% endcomment %}. You can see how that would look for hiding the price ascending option in the screenshots I've linked below. 

Screenshot 1
Screenshot 2

I also wanted to show you my sort by drop down after commenting this code out. You can see that "Price, low to high" no longer appears.

Before making any changes to the theme code I always like to suggest duplicating your theme. You can do this by going to Online Store>Actions>Duplicate. Just in case. Also, as you're using a Shopify developed theme, this is a customization our themes team may be able to look into doing for you. If you'd prefer to go that way let me know and I can start the process for you.

Did that work for you? You can give us a call too or start a live chat at any time. We're here 24/7 and are always happy to help out!

Thank you,
Lizzy

Lizzy | Social Care @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

0 Likes
Tourist
19 0 2

@Lizzy wrote:

Hey, sistersceramics.

My name is Lizzy, I'm a Guru on the support team at Shopify.

I took a look at the theme code for Brooklyn and found an area where you can remove the sort by options. If you go to Online Store>Themes>Actions>Edit Code (on the theme you're editing) it will open up the theme editor. From here you'll want to click on the Snippets folder. In there you'll find a file called collection-sorting.liquid. This file holds all of your sort by options. 

I suggest commenting out the options you'd like to remove. This way they will still be there if you want to add them back in future. You can do this be enclosing the entire line of the option between {% comment %} and {% endcomment %}. You can see how that would look for hiding the price ascending option in the screenshots I've linked below. 

Screenshot 1
Screenshot 2

I also wanted to show you my sort by drop down after commenting this code out. You can see that "Price, low to high" no longer appears.

Before making any changes to the theme code I always like to suggest duplicating your theme. You can do this by going to Online Store>Actions>Duplicate. Just in case. Also, as you're using a Shopify developed theme, this is a customization our themes team may be able to look into doing for you. If you'd prefer to go that way let me know and I can start the process for you.

Did that work for you? You can give us a call too or start a live chat at any time. We're here 24/7 and are always happy to help out!

Thank you,
Lizzy


How can I do this on debut theme? 

0 Likes
Shopify Partner
12 0 0

Not working

0 Likes