Shopify themes, liquid, logos, and UX
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.
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]
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
I hope it helps
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.
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.
Thanks- this works perfectly!!
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?
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?
@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.
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
@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.
I am using debutify theme. I did exactly same but didn't workout. Did you guys got any solution?
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
Video worked for me too. Thanks for sharing.
Hi, tried it but didn't workout. Exactly did as said. Can you help pls? You have any charges?
These steps works for me. Now, the products are hidden from search. Thanks!
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.
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.
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 -
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
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!
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
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?
Thank you so much for this!! Amazing!
Hi, did you solve it? I am looking for same issue. Tried too many stuffs but didn't workout.
Mine worked prefectly. Followed the instructions and they no longer show.
I tried this and it seems to hide from store search, but source code still shows "follow" instead of "no follow"
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024