Hi,
I'd like to remove the options on the sort menu of my Shopify store using the debut team, as I find it too cluttering.
Intended
Current
Hey there, @Anonymous
Bo here from Shopify Support!
This is a great question and the desired effect can be achieved with a little code. This tutorial is specific to an unedited version of the Debut theme, (VERSION 11.2.0). We cannot guarantee results for themes that have been modified with custom coding and/or apps. We suggest hiring a Shopify Expert if you are not comfortable proceeding with the following tutorial, or wish to make any variations to this tutorial.
{% unless option.value == 'manual' or option.value == 'title-ascending' or option.value == 'title-descending' or option.value=='created-ascending' or option.value == 'created-descending' %}
{%- for option in collection.sort_options -%}{% unless option.value == 'manual' or option.value == 'title-ascending' or option.value == 'title-descending' or option.value=='created-ascending' or option.value == 'created-descending' %} <option value="{{ option.value }}" {% if option.value == sort_by %}selected="selected"{% endif %}>{{ option.name }}</option> {% endunless %} {%- endfor -%}
Let me know how this goes and if there is anything else I can assist you with, I'm happy to help!
All the Best,
Bo
Bo | 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
I'd like to remove the two sort by price options in the debut theme. What code would I use to get that done?
Hey there, @grasshopper
{% unless option.value == 'price-ascending' or option.value=='price-descending %}
{%- for option in collection.sort_options -%}{% unless option.value == 'price-ascending' or option.value=='price-descending %} <option value="{{ option.value }}" {% if option.value == sort_by %}selected="selected"{% endif %}>{{ option.name }}</option> {% endunless %}
{%- endfor -%}
Let me know how this goes and if there is anything else I can assist you with, I'm happy to help!
All the Best,
Bo
Bo | 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
Hey there, @ARTSKUL
Bo here from Shopify Support!
Great question. This will be done a little differently than the changes above. We will instead be adding some code to the very bottom of the theme.scss.liquid.
NB When editing the CSS of your theme it is always a good idea to duplicate your theme first and making the changes on the duplicate. This will prevent any errors from occurring on your live site. We also recommend adding CSS to the bottom of the file as opposed to altering the preexisting code. The new code will overwrite the previous code.
Go to Online Store > Actions > Edit Code. Open the Assets Folder > theme.scss.liquid and scroll to the very bottom of the file. Add the following code:
#SortBy {
option[value=best-selling] {
display: none;
}
}
Click Save.
Let me know how this goes and if there is anything else I can assist you with, I'm happy to help!
All the Best,
Bo
Bo | 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
User | Count |
---|---|
564 | |
215 | |
129 | |
83 | |
45 |