Re: Unable to hide products using metafields 2.0

Unable to hide products using metafields 2.0

LibertineFragra
Tourist
7 0 4

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?

Replies 17 (17)

itsmeinah
Shopify Partner
6 0 2

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

ps10
Visitor
1 0 0

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

IronmarkRich
Visitor
1 0 0

I have the same problem.

MasonDev
Visitor
1 0 2

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.

rpiscopo-easywe
Shopify Partner
2 0 0

Did you fixed it?

LibertineFragra
Tourist
7 0 4

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

 

PierreG
Shopify Partner
3 0 4

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"

 

image (6).png

 

itsmeinah
Shopify Partner
6 0 2

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

CaptainActive
Shopify Partner
1 0 17

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

techKB
Visitor
1 0 1

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

cw-buffalo
Shopify Partner
1 0 1

Thank you CaptainActive, this also worked for me.

timd_mackey
Shopify Partner
62 1 33

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

Mireta
Excursionist
20 0 1

Hi @timd_mackey,

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?

uandi
Shopify Partner
2 0 1

It works

BurcuS
Visitor
2 0 0

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/hidde...

Victor-Roswell
Shopify Partner
1 0 0

I owe you a drink! Thank you !

Mireta
Excursionist
20 0 1

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?