PRPdc
June 9, 2022, 6:39am
1
Hi All, I need to remove/hide the “Best-Selling” and “Featured” Sort options on the collections page. Copying the code I found in “Main-Colleciton.liquid” below and the link and password to see the website:
Code
{%- if section.settings.show_sort_by -%}
{% render 'icon' with 'close' %}
{{ 'collection.sorting.title' | t }}
{% assign collection_sort_by = collection.sort_by | default: collection.default_sort_by %}
{%- for option in collection.sort_options -%}
{{ option.name }}
{%- endfor -%}
{%- endif -%}
URL: https://tbw-europe.myshopify.com/
Password: TBWPRP
Thanks
1 Like
@PRPdc
button.Popover__Value.Heading.Link.Link--primary.u-h6:first-child,button.Popover__Value.Heading.Link.Link--primary.u-h6:nth-child(2) {
display: none !Important;
}
Add this code in the bottom of theme.css file.
Navigate to Online Store->Theme->Edit code
Asset->/theme.css ->paste below code at the bottom of the file.
Save it.
PRPdc
June 9, 2022, 6:46am
3
Works perfectly! thank you very much!
1 Like
@PRPdc
Let me know if you need any more help,
We are always happy to help you.
Kindly accept and like our Solution if helpful.
thank you.
Hello @PRPdc
Add this code
{%- if section.settings.show_sort_by -%}
{% assign collection_sort_by = collection.sort_by | default: collection.default_sort_by %}
{%- for option in collection.sort_options -%
{% if option.value != "best-selling" or option.value != "featured" %}
{% endif %}
{%- endfor -%}
{%- endif -%}