Product title contains (men's vs women's)

Hi, I’m trying to separate the men’s and women’s products by using the function “if product title contains” and its not working for the men’s page because the word “men’s” is matching the word “woMEN’S” in the product title. For example,

If product title contains:

Men’s Joggers

It will return results for both "men’s joggers " AND “women’s joggers” because women’s contains the word men’s…

I’ve tried getting around this by using double quotes around men’s or the entire phrase but then it just doesn’t return anything because its not an exact match. Is there any way around this using the interface or am I stuck with having women’s search results on the men’s page? Thx.

1 Like

HI @Alc502

Have you tried this instead. Notice the space I included?

{% if product.title contains " men's" %}

{% endif %}