Shopify themes, liquid, logos, and UX
How to remove few of the sorting options
I want to remove Alphabetically & Date Sort options from dropdown
Website link- https://theactivestoryclothing.com/collections/track-pants
Solved! Go to the solution
This is an accepted solution.
Hi @incognitomode ,
You can follow the instruction below:
1. Go to Online Store->Theme->Edit code
2. Find file theme.liquid->paste below code at the before </body>:
<script>
var selectobject = document.getElementById("SortBy").querySelectorAll('option');
selectobject.forEach(function(e,i){
if (i == 2 || i == 3 || i == 6 || i ==7)
e.remove();
})
</script>
If you feel like my answer is helpful, please mark it as a SOLUTION. Let me know if you have any further questions.
This is an accepted solution.
Hi @incognitomode ,
You can follow the instruction below:
1. Go to Online Store->Theme->Edit code
2. Find file theme.liquid->paste below code at the before </body>:
<script>
var selectobject = document.getElementById("SortBy").querySelectorAll('option');
selectobject.forEach(function(e,i){
if (i == 2 || i == 3 || i == 6 || i ==7)
e.remove();
})
</script>
If you feel like my answer is helpful, please mark it as a SOLUTION. Let me know if you have any further questions.
Thanks a ton
Are you ready to take your business to the next level? Look no further than the latest ...
By SarahF_Shopify Apr 15, 2024We’re keeping the ball rolling to make sure you’re always ahead of the game. So buckle ...
By JasonH Apr 8, 2024Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024