How do I show Shopify Metaobjects on my store?
Guide

3 způsoby, jak zobrazit metaobjekty na vašem e-shopu

Summary

You can display Shopify Metaobjects on your storefront using three primary methods: Liquid code, the drag-and-drop Theme Editor or dedicated Metaobject Templates. Shopify Metaobjects are custom data structures that hold rich information. To show this data to your customers, you must connect the Metaobject instance to your theme. The easiest no-code way is typically by creating a Metaobject reference and connecting it using dynamic sources within your Theme Editor, which we will detail below. This allows you to manage and display complex data easily across your store.

What are Metaobjects?

Metaobjects are a powerful feature in Accentuate Custom Fields designed to improve the efficiency of managing your Shopify store. Think of them as containers of multiple new Metafields that you can apply anywhere in your store as many times as you want.

When you are done with creating your Metaobject, you will want to display it on your storefront. We will explain a few ways this can be done easily. 


How to display Shopify Metaobjects?

Here are three simple methods to display Metaobjects:

 

  • Using Liquid Code

This method offers precise control over how your data is displayed.

Liquid code allows you to integrate Metaobjects directly into your theme. Accentuate generates Liquid code for all your field definitions, which you can copy and use like this.

 

 

Just pay attention that in order to to access Metaobjects data, you'll need the metaobject definition type, instance handle, and field key. So, the path to access this data should look something like this:

{{ shop.metaobjects.definition_type.instance_handle.field_key }}


  • Using the Theme Editor

The Theme Editor is user-friendly and doesn’t require coding skills. Yaay! 

It's easy, just create Metaobject references and connect them to dynamic blocks in your theme. This allows you to manage and display Metaobjects easily through a graphical interface, making it ideal if you prefer a visual approach.

 

You will need to follow 3 simple steps:

  • Create a reference to the metaobject you want to use
  • Add a value to the reference
  • Connect a block on your storefront to the metaobject you are referencing

If you have not already done so you need to create a theme block that supports dynamic sources. Then you simply click the database icon in the top right and find the metaobject reference, and select the field you want to use in that block.


  • Using Metaobject Templates

Metaobject templates are perfect for creating content-rich pages. They allow you to build entire web pages from Metaobject data. This method is particularly useful for displaying complex data structures, such as detailed product information or custom content sections.

If you choose this method, make sure that the metaobject you have set up has “Publish entries as web pages” enabled.

 

 

Next, you need to create a theme template to display your Metaobjects data using the theme editor. Setting up a simple template takes just a few minutes. Once it's ready, each new active Metaobject will function as a webpage your users can visit. Be sure to include call-to-action buttons and reference products on these pages to drive more sales.


Conclusion

Metaobjects provide flexible options for displaying data on your Shopify store. Whether you prefer the precision of Liquid code, the ease of the Theme Editor, or the comprehensive capabilities of Metaobject templates, there’s a method to suit your needs. For more detailed guidance, visit the Accentuate Custom Fields Help Center.

By using these methods, you can efficiently manage and display complex data, improving the functionality and user experience of your Shopify store.

Get started with Accentuate Custom Fields