Unable to hide products using metafields 2.0

Hello,

I have a few products that I need hidden from internal search on my website. I had done this in the past using the link for on (https://rusticated.co/ecommerce/shopify/how-to-hide-products-from-shopify-search/) to create a hidden metafield. This had worked but when I switched my theme to a 2.0 theme it seems to have broken. The bulk edit procedure now no longer works. When I input a 1 in the field it either gives me an error that it is an incorrect entry or the field switches to say “true” when I save and the item does not hide.

I am also not able to define that metafield in the new 2.0 metafield section. When I try to define the seo.hidden field it tells me that namespace and key are already taken (as I had previously used the bulk editor and defined that field) I am pretty stuck.

Can anyone give me any suggestions as to what I could try?

3 Likes

I have the same problem. Are you able to figure out what’s causing the issue and are you able to resolve this?

I have the same problem and haven’t been able to find a solution. When I try to define the seo.hidden field it tells me that namespace and key are already taken

I have the same problem.

I also have a similar problem. I get an error when trying to add the seo.hidden metafield:

“Namespace and key are already taken. View metafields without a definition”

However, the field is not listed in the “Metafields without a definition” list either.

2 Likes

Did you fixed it?

As of right now this is still an issue. I have found no solution

Just ran into this today too, when trying to hide a Shipping Protection product from my store (since I only wanted it shown in my cart drawer)

Tried using seo.hidden and got the same error as everyone else here.

“Namespace and key are already taken. View metafields without a definition”



1 Like

I ended up using this link to edit the metafields:

https://yourwebsitehere.myshopify.com/admin/bulk?edit=metafields.seo.hidden%3Ainteger&resource_name=Product&return_to=%2Fadmin%2Fproducts&selectedView=all&order=title+asc

Don’t forget to change the "yourwebsitehere". I hope it helps

2 Likes

If you can’t find seo.hidden in the 2.0 metafield section. Follow the link below, assign the seo.hidden metafield a content type of “Integer” (one value, NOT a list), and save it. That should allow you to see the metafield in your 2.0 metafield list and on each product page.

https://YOURDOMAIN.myshopify.com/admin/settings/custom_data/product/metafields/migrate/seo/hidden

20 Likes

THANK YOU!!! This is exactly what I needed to do! I was so close to getting another app! Thank you thank you thank you! :raising_hands:

1 Like

Thank you CaptainActive, this also worked for me.

1 Like

No idea how you discovered this link, but this solution is genius! Thank you so much.

As an additional note, you can also use the seo.hidden metafield to hide pages, collections, and blog articles in addition to products.

The error message seems to only occur if the seo.hidden metafield has been used somewhere already. If you don’t have it set on any products (or collections, etc), you can create a new definition without problem. If you do run into the error though, just customize the link for whichever resource you’re targeting:

Products: https://YOURDOMAIN.myshopify.com/admin/settings/custom_data/product/metafields/migrate/seo/hidden

Collections: https://YOURDOMAIN.myshopify.com/admin/settings/custom_data/collection/metafields/migrate/seo/hidden

Pages: https://YOURDOMAIN.myshopify.com/admin/settings/custom_data/page/metafields/migrate/seo/hidden

Blog Articles: https://YOURDOMAIN.myshopify.com/admin/settings/custom_data/article/metafields/migrate/seo/hidden

2 Likes

It works

Hi @LibertineFragra ,
Have you noticed that the seo.hidden metafield approach added a noindex tag to all the sold out products and prevented Google from indexing it?

Hi @timdmackey ,

Have you noticed that the seo.hidden metafield approach added a noindex tag to all the sold out products and prevented Google from indexing it?

Also worked for me! I had to change my URL to the one below, but the idea is the same. Thank you so much!

https://admin.shopify.com/store/YOURDOMAIN/settings/custom_data/product/metafields/migrate/seo/hidden

I owe you a drink! Thank you !