--- layout: default title: metafield nav: group: Liquid Variables --- # metafields The metafields object allows you to store additional information for products, collections, orders, blogs, pages and your shop. You can output metafields on your storefront using Liquid. There are several Shopify apps and browser add-ons that make use of the [Shopify API](/api/metafield) to let you manage your metafields: * [Shopify FD](http://shopify.freakdesign.com.au/#ShopifyFD) to create and edit metafields * [Custom Fields](http://shopify.freakdesign.com.au/#customfields) to edit your metafields * [Metafields Editor](http://apps.shopify.com/metafields-editor) * [Metafields2](http://apps.shopify.com/metafields2) A metafield consists of a namespace, a key, a value, and a description (optional). Use the namespace to group different metafields together in a logical way. You can also specify metafields as either integers or strings. That way, you’ll end up with the right type of data when you use the metafields in your Liquid. For example, if you’ve added two metafields to a product, and each metafield has the following attributes:
Namespace Key Value
instructions Wash Cold
instructions Dry Tumble
You can then use the following Liquid in product.liquid to output your metafield:

Input

{% highlight html %} {% raw %} {% assign instructions = product.metafields.instructions %} {% assign key = 'Wash' %} {% endraw %} {% endhighlight %}

Output

{% highlight html %} Wash: Cold Wash: Cold Wash: Cold {% endhighlight %} You can use the following in product.liquid to output your second metafield: {% highlight html %} {% raw %} {% assign instructions = product.metafields.instructions %} {% assign key = 'Dry' %} {% endraw %} {% endhighlight %} If you need to output all metafields with the namespace _instructions_ attached to a given product, use the following Liquid:

Input

{% highlight html %} {% raw %} {% endraw %} {% endhighlight %}

Output

{% highlight html %} Wash: Cold Dry: Tumble {% endhighlight %} The key of a metafield is {% raw %}{{ field | first }}{% endraw %}, while the value is {% raw %}{{ field | last }}{% endraw %}.