YES/NO button option to display certain content?

Hello, I’m wondering if there’s a button that can display certain items or not. For example, if I use a tag ‘spicy’ and have a button ‘show spicy content’ it will show the items with the tag along with the normal items. I guess a two button system would be best (spicy content on/off)

Hey @lvbart sounds great i think you have to do it

Hey @lvbart

You need to be more specific with your context. Where do you want it? Collection page? Product page? Something like this is possible but will require a lot of modifications within your theme files.

Happy to help and guide you to the right direction, feel free to provide more details and I’ll see what I can do.

Cheers,
Moeed

If you’re talking about collection filtering, then yes, you can add a metafield of type “True or False” to your products and then add this metafield in Search and Discovery app as a filter.

How it will be shown is up to the theme you are using, but usually it will show as a checkbox.

Say Savor/Horizon shows these like this:

“Available at 14 Lyndon Street” is a “True or False” metafield I have on my products.

Hi @lvbart

I assume you are referring to the collection page.

You can achieve this using the following methods:

Option 1: Metafield + Search & Discovery (Easiest — No Code)

  1. Go to Settings → Metafields and Metaobjects → Products, and create a metafield (True/False type).
  2. Set it to true for all your spicy products.
  3. Open the Search & Discovery app and add this metafield as a collection filter.
  4. Customers will see it as a checkbox in the collection page filters.

Note: In this method, when a customer selects “Spicy = Yes”, it will only show spicy products, not both spicy and non-spicy products together.
This method cannot achieve: “Show spicy + normal together on toggle ON”.

Option 2: Custom On/Off Toggle Button (More Visual Control)
This requires custom development and changes to the collection page code.
We can use a tag like spicy to identify products and add a toggle button (ON/OFF) to show or hide spicy products while keeping normal products visible.

Can you tell which theme you are using, or can you share the store URL along with the password if it is password-protected?

Thanks