Does anyone know how to Hide Certain Products from search bar in shopify store?

mikeyl567
Tourist
13 0 2

I'm trying to hide some products in my store so they cant be found by searching them. (I still want the products to be live) 

From what I found online it appears the only way to do this is to edit the product metafeild. This source: https://rusticated.co/ecommerce/shopify/how-to-hide-products-from-shopify-search/ told me to implement this for each product i want to be hidden from search.

"namespace" : "seo"
"key" : "hidden"
"value" : 1
"value_type" : "integer"

I dont know if this information is correct or where to implement this code. 

Under Settings, Metfield, Product,... it doesn't appear that you can individually select a product. 

If somebody knows how to do this, or another way to hide a product from the search bar, but keep it live on your store please let me know. Id like to hide 10 products and im sure i can figure it out after receiving instructions for 1.

 

Thanks for your time

 

 

I want to hide 10 products, once i learn how to hide one, im sure i can do the rest easily.

Replies 3 (3)
drakedev
Shopify Partner
618 132 178

Hi @mikeyl567 

the instructions you read around are indeed correct.

Please follow this guide. I've just tested on Minimal Theme and it works and it should work on all themes, if they are implemented following Shopify guidelines.

Go to your backend in Settings > Metafields and click Products

Click Add Definition to add a new product metafield.

Name: Metafield name (e.g. Hide Product)
Namespace and key: seo.hidden
Description: up to you
Type: Number [Integer]

2021-08-26 21_32_59-Crazy Web Studio ~ Product metafield definitions ~ Edit Hide Product ~ Shopify.png

At this point, if you Edit any product you'll find a new metafield at the bottom of the page: just fill it with 1

2021-08-26 21_34_36-Crazy Web Studio ~ Products ~ Test Product ~ Shopify.png

I hope it helps

If my answer was helpful click Like to say thanks
If the problem is solved remember to click Accept Solution
Shopify/Shopify Plus custom development: You can hire me for simple and/or complex tasks.
mikeyl567
Tourist
13 0 2

Thank you very much for your quick support. If you dont mind quickly going over this with me it would be greatly appreciated. I havnt changed much code or added anything like this before so i want to make sure im correct and dont mess up my store.

First I go to Settings-Metafeilds

Then I manually fill in the following:

Name: Hide Product

Namespace and Key: seo.hidden

Description: use to hide products from internal search and sitemap

Select: number and integer

Validation: (Do i select minimum 1 and leave max blank?)

 

Once this is completed i click save.

 

Then, how do i add the specific products that I want hidden to this rule? I have numerous products but i only want to hide 10 of them... Also, customers can still purchase these right? I only want them hidden from search.

 

I apologize for all the questions and any further possible help would be greatly appreciated.

drakedev
Shopify Partner
618 132 178

When you define the new metafield of type Integer, do not specify Minimum or Maximum, just leave them blank.

About product modifications it is easy, you can do manually if you need to change only 10.

Open each product one by one, scroll to the end of the page and insert 1 as value for the new metafield.

 

It will disappear from Internal Search and from your Sitemap, but customer can still buy it normally.

If my answer was helpful click Like to say thanks
If the problem is solved remember to click Accept Solution
Shopify/Shopify Plus custom development: You can hire me for simple and/or complex tasks.