How Do I Delete One Of The Options On The Sort By Dropdown Menu?

How Do I Delete One Of The Options On The Sort By Dropdown Menu?
Theme Name Sense

Website https://pushandmove.com/

1 Like

Hi @nimesh003

need to remove options for here?

You have to check the collection templates and have check filter code.

If need any help please let me know.

Thanks

i want to remove date option in this filter i have applied this code but still its not working

 
{% unless option.name contains "Date" %}
    <option value="{{ option.value | escape }}"{% if option.value == sort_by %} selected="selected"{% endif %}>{{ option.name | escape }}</option>
{% endunless %}

@nimesh003

{% if option.value == 'Which value you don't want to use' %}
   option code here
{% endif %}

Please use this condition

Hi @nimesh003

If you like to delete the date option try this one.

  • From your Shopify admin dashboard, click on “Online Store” and then “Themes”.
  • Find the theme that you want to edit and click on “Actions” and then “Edit code”.
  • In the “Assets” folder, click on “base.css, style.css or theme.css” file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:
#SortBy > option:nth-child(7), 
#SortBy > option:nth-child(8) {
    display: none !important;
}

Please don’t forget to Like and Mark Solution to the post that helped you. Thanks!

this works but it is a temporary solution

@nimesh003
This is permanent solution for this.