Currently using the trade theme, I was able to remove the sort options for desktop using the following in the theme.liquid:
.facet-filters__field .select__select option[value="price-descending"],
.facet-filters__field .select__select option[value="price-ascending"],
.facet-filters__field .select__select option[value="created-ascending"],
.facet-filters__field .select__select option[value="manual"],
.facet-filters__field .select__select option[value="best-selling"],
.facet-filters__field .select__select option[value="created-descending"] {
display: none;
}
Though this does not remove them from the mobile drop down. I then tried editing the main collection product grid with the following:
{%- assign sort_by = collection.sort_by | default: collection.default_sort_by -%}
{%- for option in collection.sort_options -%}
{%- if option.value != ‘price-descending’ and option.value != ‘price-ascending’ and option.value != ‘created-ascending’ and option.value != ‘manual’ and option.value != ‘best-selling’ and option.value != ‘created-descending’ -%}
<option
value="{{ option.value | escape }}"
{% if option.value == sort_by %}
selected="selected"
{% endif %}
And even tried overwriting with javascript but the little buggers still show up
Moeed
July 30, 2024, 4:27pm
2
Hey @BrianSH
Welcome to Shopify Community! Can you share your Store URL so I can have a look on it? Also, if you have password enabled then please share the password as well. Your cooperation would be greatly appreciated.
Best Regards,
Moeed
Sure its https://circlebdiecastauctions.com/collections/auctions then view the mobile version and select the sort option
Moeed
July 30, 2024, 4:48pm
4
Hey @BrianSH
Follow these Steps:
Go to Online Store
Edit Code
Find theme.liquid file
Add the following code in the bottom of the file above tag
RESULT:
If I managed to help you then, don’t forget to Like it and Mark it as Solution!
Best Regards,
Moeed
Sorry for the confusion, I still need the sort but only for a-z and z-a
Moeed
July 30, 2024, 5:47pm
6
Hey @BrianSH
Follow these Steps:
Go to Online Store
Edit Code
Find theme.liquid file
Add the following code in the bottom of the file above tag
RESULT:
If I managed to help you then, don’t forget to Like it and Mark it as Solution!
Best Regards,
Moeed
This removes the options when viewing the sort options and requesting the mobile site on a desktop. When you are on a phone this still does not remove the options.