Limit searchbar search

ThomasHg8866
Excursionist
34 2 0

Hi,

I have two product i would like they can not be searched with the search bar but accessible in my store.

i think i have to modify the page header.liquid but i'm not sure. Can i have some help?

Or someone know how have a product in the store but accessible only with the link of the page of the product?

0 Likes
gina-gregory
Shopify Expert
710 48 176

If your store is using Shopify's built-in search functionality, you can add a special metafield to these products that will 1) remove them from site search 2) remove them from being indexed by search engines 3) remove them from the sitemap.xml.

More info here: https://shopify.dev/tutorials/manage-seo-data-with-admin-api

KieranR
Shopify Partner
296 24 88

You can use a metafield app to do what @gina-gregory is suggesting from the Admin without getting into APIs and stuff, if that's easier too. 

Full time Shopify SEO guy, based in NZ. Sometimes freelance outside the 9-5.
0 Likes
ThomasHg8866
Excursionist
34 2 0

i have find a solution by myself.

i can use the bulk of shopify for add the attribute hidden to the products and they cant be searched

0 Likes
KieranR
Shopify Partner
296 24 88

can you elaborate a bit, curious to know! is this it was the same solution (seo.hidden) as the first reply? how did you bulk edit? 

Full time Shopify SEO guy, based in NZ. Sometimes freelance outside the 9-5.
0 Likes
ThomasHg8866
Excursionist
34 2 0

ok so you just have to follow this link : https://shopify.com/admin/bulk?resource_name=Product&edit=metafields.seo.hidden:boolean&limit=250 

you connect you on the website you want to hide product and you check the products you want they be hidden on the store and searchbar

0 Likes
KieranR
Shopify Partner
296 24 88

Awesome thank you! Yeah thats a good way to do it. I keep forgetting the bulk editor can do metafields as well with a link like that. It still looks like you're editing an seo.hidden metafield on the back, but this way it's pretty easy. Just be aware those will be hidden from internal search, as well as having a noindex tag which will hide from Google too. 

Full time Shopify SEO guy, based in NZ. Sometimes freelance outside the 9-5.
0 Likes