What are standard metafield definitions and how to set them up?
It’s no surprise that metafields are incredibly powerful, as they can provide additional information to your Shopify store, including text fields, numbers, colors, URLs, and even more advanced reference types like metaobjects. Shopify has recognized the popularity of this functionality and has created predefined metafield definitions, known as standard metafield definitions.
These standard metafields are designed to be universally compatible with Shopify, following their standards. As a result, they are supported by various apps, themes, and other parts of your store. In this brief guide, we will walk you through the process of creating these standard metafield definitions.
How to set up standard metafields?
Shopify has made it quite easy for merchants. For instance, if your theme uses one of the standard metafield definitions, all you need to do is add the metafield definition initially.
We will provide an example of adding a product subtitle, a commonly used metafield definition that allows you to include an extra product subtitle as a single-line text. This subtitle can be displayed on product pages, on collection pages and in featured collection sections within the product card.
- In your Shopify admin, go to Settings, then Custom Data.
- Select Products (the specific part of your store where you want to add the definition).
- Click on Add Definition.
- In the name field, search for “Product subtitle”.
- Select this option.
- You can also indicate if you want to use the metafield definition for filtering and creating automated collections.
- Make sure to keep the “Storefront” access option selected, as it is by default.
- Save your metafield definition.
Tip: If you find that the single-line item type doesnt suit your store’s needs and you’d prefer something like a rich text type, you’ll need to create the metafield definition from the beginning. In this case, you can refer to one of our earlier articles on How to display additional product information on your store? Use integrated Shopify metafields. (Themes 2.0. and vintage themes).
Populating Metafield Definition with Values
Just like creating your own metafield definition, you also need to add values to the metafield. To do this, follow these steps:
- Go to your Shopify admin and select “Products”.
- Choose the product for which you want to add a value for the product subtitle metafield.
- Scroll down to the “Metafields” section at the bottom.
- Click on the gray field and enter the product subtitle.
- Save your changes.
Displaying Metafield Definition Values on Your Storefront
Once you’ve added the values, it’s time to showcase them on your storefront. The simplest way is to utilize an existing block such as a text field or a rich text block, or section settings, using the dynamic source feature to display the values. You can find more information on using the dynamic source in one of our previous articles.
If your theme already uses the product subtitle metafield by default, there should be built‑in support for this (like a custom block or a checkbox in the theme settings). If you can’t locate it or encounter issues, please reach out to the theme developers for assistance.
What standard metafields are available?
As of October 2023, there are 14 standard metafield definitions set up for all Shopify stores.
|Name||Type||Reserved namespace and key||Description|
||A very short product description|
||Detailed instructions on how to take care of products|
||ISBN book identifier|
||Stores a Universal Product Code|
||Stores a European Article Number|
||It stores the average rating for a product or variant.|
|Product rating count||
||It stores the total number of ratings for a product or variant.|
||It saves products that are similar to a selected product.|
|Related products setting||
||It controls how manual product recommendations are displayed – manual vs auto.|
|Search product boosts||
||It saves the search terms associated to a product.|
||It saves products that are often bought together with a selected product.|
||It saves the customer’s date of birth in ISO 8601 format.|
|Trade item description||
||Detailed product information used for customs and import|
|Product transport declaration||
||Information about public transport declarations (liquids, creams, powders, etc.|
For updates and more information, please visit the official Shopify documentation on Standard metafield definitions.
I hope I’ve successfully explained what standard metafield definitions are and how to set them up in your store. If you encounter any issues, please feel free to let me know. I’ll be happy to assist you.