[P] Understanding metafields and metaobjects

Metafields and metaobjects are powerful Shopify features allowing you to extend the platform with your custom data. Metafields and metaobjects can be displayed on your online store without custom coding.

However, metafields and metaobjects can feel complex to use at first.

Metafields

Metafields let you save additional, specialized information for products, collections, pages... that isn't directly captured in the Shopify admin. Here are some examples of what metafields could be used for:

  • List of ingredients
  • Launch date
  • Volume capacity
  • Explanatory video
  • Internal tracking information

With metafields, you can effectively extend the core platform and tailor it to your needs.

Once created, metafields can easily be re-used across different parts of the Shopify platform, including the theme editor.

For instance, you might want to show your customers "Care guide" instructions, whose content differs per product, and show this information on your online store. Shopify admin panel does not allow capturing this information out of the box, so you would typically solve this with those steps:

  1. Create a metafield "Care guide" on Shopify admin.
  2. Fill in the care guide instructions for each product.
  3. Connect the "Care Guide" metafield to a compatible section in the theme to show this information.

To learn more about managing metafields, refer to the official Shopify documentation. If you need assistance to set up metafields, we recommend you reach Shopify support.

Displaying metafields on your store

After creating metafields, you can connect them in the theme editor on sections or blocks. To connect a metafield, open the theme editor and click on the database icon next to a setting name:

The editor will show you all the metafields connected to a given field.

Not all metafields can be connected to every setting. There must be a matching between the metafield type and setting. For instance, an "image" metafield will only connect to an image set, not a text setting.

Similarly, some metafields cannot be connected, such as the metafield representing a PDF file. If you need to connect such metafields, we recommend that you reach out to Shopify support and explain your use case. This will help Shopify prioritize future developments based on customers' requests.

Variant metafields cannot be connected via the theme editor. Variant metafields require you to hire a developer.

Metaobjects

Metaobjects are a group of metafields, allowing you to manage a large number of related metafields easier.

Metaobject is a powerful yet complex feature, and most merchants do not need them initially. We, therefore, do not recommend you spend too much time understanding metaobjects at first. Metaobjects usage typically appears by itself when your store grows.

To learn more about managing metaobjects, refer to the official Shopify documentation. If you need assistance to set up metafields, we recommend you reach Shopify support.