I’m looking for help to remove some of the sort options on my store, using the taste theme.
I only would like to keep the alphabetical options.
My website is: https://goldstar3343.myshopify.com/
there is no password.
Thanks so much for your time!!!
I’m looking for help to remove some of the sort options on my store, using the taste theme.
I only would like to keep the alphabetical options.
My website is: https://goldstar3343.myshopify.com/
there is no password.
Thanks so much for your time!!!
Hi,
To remove all other “sort by” options and only show the “Alphabetically” options, you will need to modify some places. Please follow the steps below.
Go to Online Store > Theme > Actions > Edit code
Open facets.liquid under Snippets
You have to find the code below (Line 319, 365, 574).
And then, replace the above code with the code below.
There is another liquid to be modified.
Please open main-collection-product-grid.liquid under Sections.
Find the first code at line 41. and replace it with the second code.
If you have never changed the facets.liquid before, you may replace the entire code by the code below.
{%- if filter_type == 'vertical' or filter_type == 'horizontal' -%} {% comment %} Sorting for vertical filter are grouped with filter when no JS{% endcomment %} {%- if enable_sorting and filter_type == 'vertical' -%} {%- endif -%} {%- endif -%} {% comment %} Drawer and mobile filter {% endcomment %}
{%- for filter in results.filters -%} {%- for value in filter.active_values -%} {%- endfor -%} {%- if filter.type == "price_range" -%} {%- if filter.min_value.value != nil or filter.max_value.value != nil -%} {%- endif -%} {%- endif -%} {%- endfor -%}
{% comment %} Sort, product count and filter pills at the end when filter is type of Drawer for the correct tabbing order {% endcomment %} {%- if enable_sorting and filter_type == 'drawer' -%} {%- endif -%}## {%- if results.results_count -%} {{ 'templates.search.results_with_count' | t: terms: results.terms, count: results.results_count }} {%- elsif results.products_count == results.all_products_count -%} {{ 'products.facets.product_count_simple' | t: count: results.products_count }} {%- else -%} {{ 'products.facets.product_count' | t: product_count: results.products_count, count: results.all_products_count }} {%- endif -%}
{%- if filter_type == 'drawer' -%} {%- endif -%}
Don’t forget to backup the original fine before editing and save the file after change.
If you need any further assistance, please let me know.
Hope it helps.
Thanks.
Hey, @heyitsphae
There is an in-depth, beginner friendly tutorial here teaching how to achieve that.
You can choose what options you’d like to remove, it is also very simple to revert if you change your in mind in the future or if you want to A/B test.
Let me know if you need any further assistance.
Kind regards,
Diego
off sitewide
July sale — 45% off at checkout, applied automatically. Valid for 60 minutes. One per customer.
Offer ends in