Shopify admin: filter products by multiple tags

Hi, I want to know how I could filter my product list by two or three tags. (this time “AND” condition).

I have tried by filtering by a tag, save as new search and I have finally tried to add another “tagged with” filter in that saved search

But Shopify Admin change and only filter by this second “tagged with”.

Is it imposible?

Thanks.

1 Like

I didn’t find this helped, but if you use quotation marks in the search bar you can add multiple tags. On my system I have one tag in the filter and two more in the search bar.

For example I have T-shirt in the filter and “blue” “V neck” in the actual search bar and that seems to be working for me.

1 Like

In the search bar you should use the Shopify API Search syntax. For instance we have tags 1st Order and 2nd Order. So if I wanted to find customers who are not tagged with 1st Order I would type:
-“1st Order” or NOT “1st Order”

You may then save this as a filter. You can also chain off of this and add more. If you’d like to learn more about this you can read up here https://shopify.dev/api/usage/search-syntax

1 Like

I don’t see how this was solved?

For those coming after, this @ChrisKG 's solution does actually work.

Use the search bar and inverted commas around your term. Use - before this to search for items without that term. Worked for me on searching orders without tags.

2 Likes

I just came across this thread as I was having the same issue and looking for a solution. I couldn’t get any of the above solutions provided to work, however I figured out how to do this:

The trick is that you need to use the search bar and NOT the filters. Secondly you need to format the search in the following way:

tag:‘tag1’ OR tag:‘tag2’

(This shows all that include tag1 or tag2)

Alternatively:

tag:‘tag1’ AND tag:‘tag2’

(This shows only where the result has both tag1 and tag2)

5 Likes

@RobertCo solution above works for me too. You must format the search query exactly. “tag” must be lowercase. The quotes have to be straight quotes, but you can use single or double. “OR” must be all caps.

Straight quotes are hidden under the iOS tap-hold menu for each quote character on the character keyboard.

One frustrating thing about this solution is that it will work for a current search, but will not be saved as a “view”. Only one of the tag queries is saved, and negative queries will be converted to positive.
Still, at least we are able to do it in some fashion.

1 Like

@George_C - it does seem like it updates the URL though, so bookmarking the query in your browser might do the job. Not quite as good, but at least you won’t have to enter it each time.

1 Like

@RobertCo good call on the URL, thank you.

Hi,

I think this does not work anymore. Is

there any other way to bring products with different tags to one list?

I’ve tested this and it still seems to work. Do you want to post the exact string that your putting into the search, perhaps there’s something wrong with they way you’re formatting it?

So it looks like now the value DOES get saved in the view.

Next question, is there a way to say ‘not’ with this syntax. IE tag is not PC OR not P ?

1 Like

thank you, this helped me

Thank you Robert, this worked for me.

Do you know if there’s a way to use AND to find products that match one tag and start with a second tag?

For example:

tag:‘new’ AND tag:‘TentSale’

I want to find products that have a tag of new and a tag starts with TentSale.

Or how would you string this to find products for these two options:

tag:‘new’ AND tag:‘TentSale20’ AND

tag:‘new’ AND tag:‘TentSale30’

Or am I out of luck on this one?

Thank you!

I’m not sure whether it is possible to do a tag contains - perhaps someone else could jump in if they’ve found a way to do it. However I believe I’ve come across a way to do a general ‘contains’ against the product (it will check if the string is contained anywhere in the product record as far as I can see: description, tags, title etc.). The way you would use this is:

tag:‘new’ AND ⊂’TentSale’

If TentSale is only being used in tags and not refenced elsewhere in the product record the above should work. However I haven’t really fully tested it so can’t say for sure.

I was looking for an answer to this as well and saw no one replied to you so I did some testing myself.

This is how I got it to work for NOT with multiple tags:
NOT (tag:“tag1” OR tag:“tag2”)

You would have to test it yourself to see if it works with more than two by just adding another OR, but I only needed the two :slightly_smiling_face:

Robert,

Again thank you for your help!

Is there a website or resource you could point me to that shows the syntax to use in the search field on the products page?

For example I would like to do a search on the “compare-at price” field. I’m seeing where I think I would use :laughing: to mean greater than, but it’s doesn’t seem to work so I wonder if I’m using the right syntax for the “compare-at price”. I’ve searched around on Shopify but just not finding what I need.

Thank you