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

mikeyl567
Excursionist
18 0 5

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 23 (23)

drakedev
Shopify Partner
685 148 230

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
Excursionist
18 0 5

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
685 148 230

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.
wbyw
Excursionist
39 1 13

Thanks- this works perfectly!!

SirBLT
New Member
4 0 0

This didn't work for me. It look a little different now, asking if you want to expose it to an API, if you want 1 value or a list of values... I set it up right, went to edit the product I'd like to be hidden from the search, & entered the number 1 in the metafield, but it still shows in a search. Anyone know what I'm doing wrong here?

SirBLT_0-1662753509267.png

 

SirBLT
New Member
4 0 0

Did this exact same thing, even went word for word in the description, & it just won't work for me. I cleared my cache & cookies, I waited 20-30 min to see if it just needed some time, it just doesn't want to hide for some reason. I'm only trying to hide 2 products, but the universe is saying "nah, bro...not on my watch!" Can you think of anything else it could be? There is a metafield that is already using numbers —> Integer for products, could that be it?

Smeelah
Navigator
333 1 91

@SirBLT My understanding is that the metafields will hide the product from something like Google search, but not the internal search. 

This article  has a section with code for excluding products from Shopify's search using a single tag and it has been working for me. 

Fry
Explorer
74 2 38

Hi all

 

When I use the setting seo.hidden = 1 it does both for me. It exclude it from the internal search and also setting the meta robots from index to noindex (<meta name="robots" content="noindex,nofollow" />) Maybe it depends on the theme??

 

Do you have an idea, for only disable a product for the internal search?

 

Thanks

Felix

 

 

Smeelah
Navigator
333 1 91

@Fry , I think you are right that it may be theme dependent. When I was using the Minimal theme, I used the metafield for seo and some other code (link in my previous post) for internal search. Now that I'm on a 2.0 theme (Dawn), the metafield is blocking products from internal search without the additional code. 

Dashergrooming
Tourist
10 1 9

I am using debutify theme. I did exactly same but didn't workout. Did you guys got any solution?

EricIronWill
Tourist
9 1 7

Hi, I am also looking for a solution to this. Have you had any success?

 

- UPDATE: This video from Will Misback worked for me. https://youtu.be/UWs_YpimlX8

Katherine_Swift
Shopify Partner
18 0 4

Video worked for me too. Thanks for sharing.

Dashergrooming
Tourist
10 1 9

Hi, tried it but didn't workout. Exactly did as said. Can you help pls? You have any charges?

scaleupprint
Shopify Partner
40 4 10

These steps works for me. Now, the products are hidden from search. Thanks!

If you find my post helpful, please like and accept solution
Advanced Product Customizer Image Swatch, Color Swatch, unlimited product options, product designer for personalized products
Email: info@scaleupprint.comFor Shopify tips & tricks follow our YouTube channel
Joel_S
Visitor
2 0 0

Is it possible to do this for collections as followed the same guidelines but added on collections custom data but when searching it still shows through the search. 

Joel_S
Visitor
2 0 0

Collection - Is it possible to do this for collections as followed the same guidelines as above for products but for collections but when searching it still shows through the search. Is there a way using this method to hide the collections from search. 

scaleupprint
Shopify Partner
40 4 10

Hi @Joel_S 

 

One method for hiding collections from search results involves modifying the code in search theme file of a Shopify theme. By utilizing custom code, you can apply filters to the search results to hide specific collections from being displayed in search suggestions. For example,  here is the result for us after adding the custom code in predictive-search.liquid file for filtering the results in the Sense theme of Shopify - 

 

image.png

If you find my post helpful, please like and accept solution
Advanced Product Customizer Image Swatch, Color Swatch, unlimited product options, product designer for personalized products
Email: info@scaleupprint.comFor Shopify tips & tricks follow our YouTube channel
greentouch
Shopify Partner
13 0 1

Hi, 

Thanks for the solution. 

But is there another solution to ONLY hide product from Search internal Shopify bar and notre SEO/Search Google ? 
Because, i do not want to display some product on my website but i want to use the content of the product for the SEO. 

Thank's a lot for your help, 
Matthieu

Watchcraft
Visitor
1 0 0

Hi @drakedev - I tried using this solution, but when I went into the Metafields, it said seo.hidden was already in use.

 

I'm not sure how! Do you have any other suggestions on how to hide a Shopify product from search? 

 

Thanks!

drakedev
Shopify Partner
685 148 230

If the metafield was already created you can use a Metafield app editor to change the value. One of my favorite app is "Metafields Guru" a free app that you can install on your store.

Once installed you can open a product and in More Actions click on Edit Metafields

drakedev_0-1699514496954.png

 

 

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.
Ramiz1
Visitor
1 0 0

Thanks for this! Is there any solution where the above can be automated or there can be a condition so that we don't have to do this for all products manually and for future products?

Dashergrooming
Tourist
10 1 9

Hi, did you solve it? I am looking for same issue. Tried too many stuffs but didn't workout.

utkilts
Tourist
12 0 3

Mine worked prefectly.  Followed the instructions and they no longer show.