Hi
I had pasted a code in theme.liquid to delete some items from the “Sort by” menu.
The code is working fine when im checking from my system(windows) and phone(android) but when i check from my friends Macbook and iPhone, the sort by options are still there. (Please check images attached)
The code i used :
option[value="title-ascending"], option[value="best-selling"], option[value="title-descending"], option[value="created-ascending"], option[value="created-descending"] { display: none !important; }
Check Images
-
“Sort by” as seen from my system
-
“Sort by” seen from Macbook
Hi @CNDY_123
You’re doing it using CSS, so it might still appear when searching from a friend’s phone or desktop. This could be due to reasons like cached webkets, etc
To remove the sort option in the Dawn theme, follow these steps:
- Go to your Online Store in Shopify.
- Navigate to Theme.
- Click the three dots next to the theme and select Edit Code.
- In the code editor, search for the file named main-collection-product-grid.liquid. (In the Dawn theme, this file may be named slightly differently, but it should be similar.) Inside this file,
look for the sort code, which should resemble the following:
Carefully replace this with this:
If you have any problem let me know
Hi @Mehran_Ali
Tried pasting the code exactly..but didnt work…Its not changing anything..
Okay i can check that if you can share the collaboration code to me
1 Like
hi @Mehran_Ali
The above code actually worked…The issue was only with one system…when checked from another systems the issue is not there…
Thank You for your valuable time!
1 Like
great if the above sooution working kindly mark it as solution