Is it possible to have a filter option auto-selected by default?

1 0 2

Hello, I've searched high and low for the answer to this but can't seem to find any clear information other than use an app. I'm hoping that there is a simple code change that can be made to ensure that when a page with filters is accessed that one of them can be enabled by default. I've got the Shopify Search & Discovery app installed if it makes a difference for the code.


To clarify the why behind this, I'm looking to make the "Availability" option "In Stock" automatically selected by default. Therefore hiding out of stock items, but still giving customers the ability to see what is out of stock if they wish.


Thanks for taking the time to read this and hopefully someone can assist.

Reply 1 (1)

4 0 2

Go to the collection page, select "In Stock" from the availability filter, copy the url, then paste the url into the link that customers will be using to get to that collection.