Remove a sorting option on Collection page

Hi.

I’m currently using Fame theme and I want to delete the sort “Alphabetically” and “Date” options. I can’t seem to find the code for that. Our website is https://sotwjewelry.com/

This is what I have for main-collection.liquid:

{%- for option in collection.sort_options -%}> - >
class=“checkmark-input”> type=“radio”> name=“sort_by”> id=“sortByOption-{{ forloop.index }}”> value=“{{ option.value | escape }}”> data-name=“{{ option.name | escape }}”> form=“FiltersForm”> {% if option.value == sort_by %}> checked> {% endif %}> >> > >
{% endfor %}>

Thank you.

Hi @johncAthra ,

This is Anthony from Beae Landing Page Builder, and I’m happy to assist you today.

While I acknowledge that this issue falls short of the desired outcome, I have an idea that I believe might be of help:

  1. Go to Online Store → Theme → Edit code
  2. Open your theme.liquid file
  3. Paste below code before :

Best regards,

Anthony

Hi @johncAthra

You can try this.

  • 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:
#sort__list > li:nth-child(3),
#sort__list > li:nth-child(4),
#sort__list > li:nth-child(7),
#sort__list > li:nth-child(8) {
    display:none !important;
}

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

This solution worked. Thank you!