How can I customize the 'sort by' options in the Dawn theme?

Hello

In the image below, I show you the “sort by” options that is basic on my shopify theme (DAWN THEME) but I would like to know how to customize it to keep only:

  • Date, New to Old

  • Ascending price

  • Decreasing price

  • Featured

How can I do this please?

My website is jadis-shop.com

my website is for french people

i use dawn theme

Thanks in advance

JADIS_1-1676712836253.png

Hi @JADIS ,

This is Richard from PageFly - Landing page builder, I’d like to suggest this idea:
Step 1: Go to Online Store->Theme->Edit code
Step 2: Snippets->/facets.liquid-> Replace your code by below code:

Show More
{%- 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 != null or filter.max_value.value != null -%} {%- 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 -%}

I hope it would help you
Best regards,

Richard | PageFly

Thank you it’s once again great everything is perfect except that you put

“Date, Old to New” and I would like the opposite “Date NEW TO OLD”

is it possible to change it please

:heart:

Hi @JADIS ,

You can try below code:

Show More
Show More
{%- 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 != null or filter.max_value.value != null -%} {%- 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 -%}

I hope it would help you
Best regards,

Richard | PageFly

THANKS A LOT YOU ARE TOO GOOD

i have more questions here maybe you can help me bro

https://community.shopify.com/post/1951376

https://community.shopify.com/topic/1951354

Hi Richard I would like to ask where to copy and paste this coding?

You just need to go to the theme translation (edit the default theme content), find the item you want to delete then enter a space.