Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
query tumbleDryProducts {
collection(handle: "xxxxxxxxxxx") {
id
handle
title
products(first: 10, filters: { productMetafield: { namespace: "custom", key: "flag_name", value: "top" } }) {
nodes {
id
title
metafields(identifiers: [{namespace: "custom", key: "flag_name"}]) {
key
value
}
}
}
}
}
Hi, have you manage to find solution, or still need help ?
iam more intrigued to enable filter including metafields on search route 😕
If somebody is still trying to find a solution, thing that was a blocker for me was a Shopify Search & Discovery app. You HAVE to install it and then go in that app, filters settings and enable filters for specific metafields! Check docs on this link and make sure to check first section requirements.
Regarding unauthenticated_read_product_listings access scope, my Hydorgen storefront already had this permission, but for other storefronts you might have to enable it.
Does the filter work on search route tho ?
I haven’t explored predictive search much yet, but as far as I can tell from the documentation, it uses a predefined list of properties for searching. So, adding any filters in the Shopify Search & Discovery app only allows filtering by that field in the collections GraphQL query, as shown in the first blog post. You can see all the properties used for filtering in predictive search in the documentation here. Hope this helps!
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025