Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I would like to remove the Best Selling Option from my sort by. In our case is called "Lo más vendido" (in Spanish). I've tried a bunch of different ways but I either get an error or no change at all. Please help. Thanks!
Hi @mandarin_bot,
Thank you for reaching out to the Shopify community. I'd be glad to assist you. Could you kindly share your store URL and
password (if it’s password-protected) so I can review it and provide you with an update?
Hello @mandarin_bot ,
Edit theme.liquid search for </body> and just before to it add this code
<script>
document.addEventListener("DOMContentLoaded", function () {
document.querySelectorAll('li[data-sort-by-item]').forEach(li => {
let span = li.querySelector('span[data-value="best-selling"]');
if (span) {
li.style.display = "none";
}
});
});
</script>
Regards
Guleria
Amazing! This worked! Thank you!! Which code should I add to also not show the "Características" option value?
I appreciate it 🙂
You can remove the "Best Selling" ("Lo más vendido") sort option in the ELLA theme by editing the theme code. Here’s how:
If you’re not comfortable editing code, you can also hide the option with CSS by adding this to theme.css or base.css:
option[value="best-selling"] { display: none; }
Discover how to increase customer engagement on your store with articles from Shopify A...
By Jacqui Apr 23, 2025Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025