I am trying to remove some of the options in the “sort by” dropdown menu.
I know there is a way to do this by going into Snippet->collection-sorting.liquid but I am using Empire theme and do not see this snippet.
If someone could direct me to where I should go to remove some items from the sort by dropdown menu it would be greatly appreciated.
My URL: https://www.temporary-url.com/E39EF
Many thanks
Hello, @Diamond2
Thanks for post
- Go to Online Store->Theme->Edit code
- Asset->/theme.css->paste below code at the bottom of the file.
.utils-sortby {display: none;}
Thanks for the reply @KetanKumar
This just completely removes the sort by option though. I want to just remove certain options in the sort by menu such as “alphabetically” and “featured” and so on.
Thanks
@Diamond2
Thanks for update
if possible to provide sidebar code so i will update
@KetanKumar
This is from the snippets → product-grid-sidebar.liquid
{% comment %}
@param filter_style {String}
Type of filtering style, 'none', 'tags', or 'groups'
@param filter_position {String}
Where to position filters, 'above_menus', or 'below_menus'
@param filter_limit {String}
How many tags (non grouped) should show
@param menu_depth {String}
How many child menus to show
@param show_prod_count {Bool}
Show product count on collection menu links
{% endcomment %}
{% if filter_position == 'above_menus' %}
{% include 'product-grid-sidebar-filters' %}
{% endif %}
{% comment %}
Collection menus
{% endcomment %}
{% if section.blocks.size > 0 %}
{% assign sidebar_menu_depth = menu_depth | times: 1 %}
{% endif %}
{% unless filter_position == 'above_menus' %}
{% include 'product-grid-sidebar-filters' %}
{% endunless %}
@KetanKumar
Any idea on how to do this?
Thanks
Heyo, how are you? Without finding the snippet that contains your sorting specifically, a way you can do this is to use the values of the options in your select. Currently your select is as follows:
You can hide any of the options by adding into your css option[value=“value”] and setting display to none. For instance if you want to hide “Featured” you would add this to the bottom of your theme.scss.liquid file in your Assets folder:
option[value="manual"] {
display: none;
}
Want to hide Alphabetically ascending? Sure, you can append that after the first option with a comma:
option[value="manual"], option[value="title-ascending"]{
display: none;
}
You can do that for as many as you need, just keep adding commas and the correct values in the quotes.
@Ninthony Absolute legend.
Thank you so much.
One small problem though. When I’m putting the ones that I don’t want to be displayed like this code below then the “best selling” and “featured” automatically disappear for some reason even though I am not putting them in the code.
option[value="manual"], option[value="title-ascending"]{
display: none;
}
option[value="manual"], option[value="title-descending"]{
display: none;
}
@Ninthony Sorry about that. My fault. I got it now.
Didn’t realize that featured was value=“manual”.
Thanks again friend.
No problem, feel free to PM me if you have any other questions.