---
description: >-
  In this section, you can find a detailed explanation of the “AND” & “OR”
  filters logic.
---

# Filters logic

{% hint style="warning" %}
The Shella theme provides two filtering approaches: filters by [<mark style="color:blue;">product tags</mark>](https://mpithemes.gitbook.io/shella-shopify-theme/collections/content/option-filters) (the old filtering method) and [<mark style="color:blue;">storefront filtering</mark>](https://mpithemes.gitbook.io/shella-shopify-theme/collections/content/filters) by Shopify. These two methods use the filter logic by default. If you want to use the filter logic “**AND**”, you can set up filters by product tags. To use the filter logic “**OR**”, apply the needed settings to display the [<mark style="color:blue;">storefront filtering</mark>](https://help.shopify.com/en/manual/online-store/themes/customizing-themes/storefront-filters).
{% endhint %}

### Filters logic

'AND' - shows products that have all selected attributes. 'Black' AND 'XXL'. Narrow filter results.

'OR' - shows products that have at least one selected attribute. 'Black' OR 'XXL'. Wide filter results.

#### What are tags?

Tags are keywords for the product. They describe the product in detail so that the system can find the needed product for the customer using a filter, e.g.: Zara, Women, Vintage, Trainers, T-Shirts & Tanks, Sunglasses, Summer, etc. You can find tags in _Shopify Admin -> Products -> All Products_. Choose any product and click on it. More information about how to create and use tags in Shopify you can find [<mark style="color:blue;">**here**</mark>](https://help.shopify.com/en/manual/productivity-tools/using-tags).

#### How tags can affect the filter?

The filters by tags use the filter logic “AND” by default.

**A filter logic “AND”**

This filter logic includes only products with all tags, 'tag1' and 'tag2' in a filtering result.

Example:

There is a T-shirt with the following tags: Red, White, Blue M, S, L, Zara, T-Shirt, Summer.

There is a jacket with the following tags: Green, Red, 34, 36, 38, Armani, Autumn.

There is a hat with the following tags: Black, Silver, One size, Gucci, Summer.

Now, the customer is searching for red, summer products. The system will show only a T-shirt to a searcher because only this product has both “red” and “summer” tags.

#### A filter logic “OR”

This filter logic includes in filter results all products with all selected attributes.

Example:

There is a T-shirt with the following tags: Red, White, Blue M, S, L, Zara, T-Shirt, Summer.

There is a jacket with the following tags: Green, Red, 34, 36, 38, Armani, Autumn.

There is a hat with the following tags: Black, Silver, One size, Gucci, Summer.

Now, the customer is searching for green, Gucci products. The system will show both products: a jacket (because it has a “green” tag) and a hat (because it has a “Gucci” tag).
