{% LIQUID REFERENCE %}
Shopify Liquid チートシート / 顧客・ブログ・メタフィールド
収録 51 項目 | 仕様確認 2026年10月(shopify.dev)
顧客・住所・会社(B2B)・フォームと、ブログ記事・ページ・メニュー(linklist)・メタフィールド・メタオブジェクトのオブジェクトをまとめました。
顧客・会社・フォーム
customer
オブジェクトログイン中の顧客の情報です。ログインしていなければ nil になります。
書き方
{% if customer %}
{% if customer %} でログイン判定ができます。タグで会員ランクを判定する使い方が定番です。
例
{% if customer %}
{{ customer.first_name }}様
{% else %}
<a href="{{ routes.account_login_url }}">ログイン</a>
{% endif %}
主要プロパティ(下に説明あり)
customer.first_name customer.email customer.tags customer.orders_count customer.total_spent customer.orders customer.accepts_marketing customer.metafields
その他のプロパティ(18件・名前のみ。クリックで shopify.dev の説明へ)
last_name last_order name phone has_account id default_address addresses addresses_count tax_exempt payment_methods b2b? company_available_locations company_available_locations_count current_location current_company has_avatar? store_credit_account
customer.first_name
プロパティ顧客の名(下の名前)です。
書き方
{{ customer.first_name }}
日本の顧客は姓を last_name に入れることが多いため、表示順に注意します。
例
{{ customer.last_name }} {{ customer.first_name }}様
customer.email
プロパティ顧客のメールアドレスです。
書き方
{{ customer.email }}
例
{{ customer.email }}
customer.orders_count
プロパティ顧客の注文回数です。
書き方
{{ customer.orders_count }}
例
{% if customer.orders_count == 0 %}初回購入特典{% endif %}
customer.total_spent
プロパティ顧客の累計購入金額です。
書き方
{{ customer.total_spent | money }}
例
{{ customer.total_spent | money }}
customer.orders
プロパティ顧客の注文履歴の配列です。
書き方
{% for order in customer.orders %}
例
{% for order in customer.orders limit: 5 %}{{ order.name }}{% endfor %}
customer.accepts_marketing
プロパティメールマガジンの受信を許可しているかどうかです。
書き方
{% if customer.accepts_marketing %}
例
{% unless customer.accepts_marketing %}メルマガ登録はこちら{% endunless %}
customer.metafields
プロパティ顧客のメタフィールドです。
書き方
{{ customer.metafields.custom.キー.value }}
例
{{ customer.metafields.custom.birthday.value | date: '%m月%d日' }}
address
オブジェクト住所の情報(顧客の住所・配送先など)です。
書き方
{{ address.city }}
チートシートでは customer_address と書かれていますが、公式では address オブジェクトです。
例
{{ customer.default_address | format_address }}
company
オブジェクトB2B(企業向け販売)で顧客が所属する会社の情報です。
書き方
{{ company.name }}
例
{% if customer.b2b? %}{{ customer.current_company.name }}{% endif %}
プロパティ(6件・名前のみ。クリックで shopify.dev の説明へ)
id name external_id available_locations available_locations_count metafields
company_address
オブジェクト会社の拠点の住所です。
書き方
{{ address.city }}
例
{{ customer.current_location.shipping_address.city }}
プロパティ(13件・名前のみ。クリックで shopify.dev の説明へ)
attention id address1 address2 first_name last_name city zip country_code province_code country street province
company_location
オブジェクト会社の拠点(支店など)の情報です。
書き方
{{ location.name }}
例
{{ customer.current_location.name }}
プロパティ(10件・名前のみ。クリックで shopify.dev の説明へ)
id name external_id url_to_set_as_current current? company shipping_address tax_registration_id metafields store_credit_account
customer_payment_method
オブジェクト顧客が保存している支払い方法です。
書き方
{{ method.payment_instrument_type }}
例
{% for m in customer.payment_methods %}{{ m.payment_instrument_type }}{% endfor %}
プロパティ(2件・名前のみ。クリックで shopify.dev の説明へ)
store_credit_account
オブジェクト顧客のストアクレジット(ストア内で使える残高)です。
書き方
{{ account.balance | money }}
例
{% if customer.store_credit_account %}{{ customer.store_credit_account.balance | money }}{% endif %}
プロパティ(1件・名前のみ。クリックで shopify.dev の説明へ)
form
オブジェクトform タグの中で使える、フォームの状態や入力値です。
書き方
{{ form.errors }}
送信後のエラーや成功(posted_successfully?)を判定できます。
例
{% form 'contact' %}{% if form.posted_successfully? %}送信しました{% endif %}{% endform %}
プロパティ(20件・名前のみ。クリックで shopify.dev の説明へ)
errors address1 address2 author body city company country email first_name id last_name password_needed phone posted_successfully? province set_as_default_checkbox name message zip
form_errors
オブジェクトフォームのエラー内容の一覧です。
書き方
{{ form.errors.messages }}
例
{% for field in form.errors %}{{ form.errors.translated_fields[field] }}: {{ form.errors.messages[field] }}{% endfor %}
プロパティ(2件・名前のみ。クリックで shopify.dev の説明へ)
ブログ・ページ・メニュー・メタフィールド
article
オブジェクトブログ記事1件の情報です。
書き方
{{ article.title }}
記事ページで自動で使えます。
例
<h1>{{ article.title }}</h1>
{{ article.published_at | date: '%Y.%m.%d' }}
主要プロパティ(下に説明あり)
article.title article.content article.excerpt_or_content article.published_at article.tags article.image article.metafields
その他のプロパティ(14件・名前のみ。クリックで shopify.dev の説明へ)
author handle id url template_suffix created_at updated_at moderated? comments comments_count comments_enabled? comment_post_url excerpt user
article.title
プロパティ記事のタイトルです。
書き方
{{ article.title }}
例
{{ article.title }}
article.content
プロパティ記事の本文(HTML)です。
書き方
{{ article.content }}
例
{{ article.content }}
article.excerpt_or_content
プロパティ抜粋があれば抜粋、なければ本文を返します。
書き方
{{ article.excerpt_or_content }}
記事一覧の紹介文に使います。
例
{{ article.excerpt_or_content | strip_html | truncate: 100 }}
article.published_at
プロパティ記事の公開日時です。
書き方
{{ article.published_at | date: '%Y.%m.%d' }}
例
{{ article.published_at | time_tag: '%Y.%m.%d' }}
article.image
プロパティ記事のアイキャッチ画像です。
書き方
{{ article.image }}
例
{% if article.image %}{{ article.image | image_url: width: 800 | image_tag }}{% endif %}
article.metafields
プロパティ記事のメタフィールドです。
書き方
{{ article.metafields.custom.キー.value }}
例
{{ article.metafields.custom.parent_article.value }}
articles
オブジェクトハンドルを指定して任意の記事を取り出せるオブジェクトです。
書き方
{{ articles['blog/article'] }}
例
{% assign a = articles['news/2026-sale'] %}{{ a.title }}
blog
オブジェクトブログ(記事のまとまり)の情報です。
書き方
{{ blog.title }}
例
{% for article in blog.articles limit: 5 %}{{ article.title }}{% endfor %}
主要プロパティ(下に説明あり)
blog.articles
その他のプロパティ(13件・名前のみ。クリックで shopify.dev の説明へ)
id title handle articles_count metafields url template_suffix all_tags tags comments_enabled? moderated? next_article previous_article
blog.articles
プロパティブログの記事の配列です。
書き方
{% for article in blog.articles %}
例
{% for article in blog.articles limit: 3 %}{{ article.title }}{% endfor %}
blogs
オブジェクトストアのすべてのブログです。ハンドルで1つを取り出せます。
書き方
{{ blogs['handle'] }}
例
{% for a in blogs.news.articles limit: 3 %}{{ a.title }}{% endfor %}
comment
オブジェクトブログ記事へのコメントの情報です。
書き方
{{ comment.content }}
例
{% for c in article.comments %}{{ c.author }}: {{ c.content }}{% endfor %}
プロパティ(8件・名前のみ。クリックで shopify.dev の説明へ)
user
オブジェクトブログ記事を書いたスタッフの情報です。
書き方
{{ article.author }}
例
{{ article.user.first_name }}
プロパティ(8件・名前のみ。クリックで shopify.dev の説明へ)
account_owner bio email first_name homepage image last_name name
page
オブジェクト固定ページ(会社概要など)の情報です。
書き方
{{ page.title }}
例
<h1>{{ page.title }}</h1>{{ page.content }}
プロパティ(9件・名前のみ。クリックで shopify.dev の説明へ)
id author handle title template_suffix content url metafields published_at
pages
オブジェクトハンドルを指定して任意の固定ページを取り出せるオブジェクトです。
書き方
{{ pages['handle'] }}
例
{{ pages['shipping'].content }}
policy
オブジェクト返品・プライバシーなど、ストアのポリシーの情報です。
書き方
{{ policy.title }}
例
{% for p in shop.policies %}<a href="{{ p.url }}">{{ p.title }}</a>{% endfor %}
linklists
オブジェクト管理画面で作ったすべてのメニューです。
書き方
{{ linklists['handle'] }}
例
{% for link in linklists['footer'].links %}{{ link.title }}{% endfor %}
公式ドキュメント | 関連TIPS:【Horizon】テーマ「Horizon」でストアのメニューから自動でパンくずリストを生成するテーマブロック | 目次へ戻る ↑
linklist
オブジェクトメニュー1つ分の情報です。
書き方
{{ linklist.links }}
テーマ設定のメニュー選択(link_list 型)からも取り出せます。
例
{% for link in section.settings.menu.links %}<a href="{{ link.url }}">{{ link.title }}</a>{% endfor %}
link
オブジェクトメニュー内のリンク1つ分の情報です。
書き方
{{ link.title }}
current(今のページか)や子メニュー(links)を持ちます。
例
<a href="{{ link.url }}"{% if link.current %} aria-current="page"{% endif %}>{{ link.title }}</a>
主要プロパティ(下に説明あり)
link.links link.current
その他のプロパティ(10件・名前のみ。クリックで shopify.dev の説明へ)
active child_active child_current handle object title data_sharing_opt_out_icon type levels url
公式ドキュメント | 関連TIPS:【Horizon】テーマ「Horizon」でストアのメニューから自動でパンくずリストを生成するテーマブロック | 目次へ戻る ↑
link.links
プロパティ子メニュー(下の階層のリンク)の配列です。
書き方
{% for child in link.links %}
例
{% for child in link.links %}{{ child.title }}{% endfor %}
link.current
プロパティ表示中のページへのリンクかどうかです。
書き方
{% if link.current %}
例
{% if link.current %}class="is-current"{% endif %}
metafield
オブジェクトメタフィールド(商品などに追加した独自の項目)1つ分の情報です。
書き方
{{ product.metafields.custom.キー.value }}
値は .value で取り出します。型(type)によって返る値が変わり、リスト型は配列になります。
例
{% assign spec = product.metafields.custom.material %}
{% if spec != blank %}素材: {{ spec.value }}{% endif %}
出力
素材: 綿100%
主要プロパティ(下に説明あり)
metafield.value metafield.type metafield.list?
metafield.value
プロパティメタフィールドの値です。
書き方
{{ metafield.value }}
型に応じて文字列・数値・オブジェクト・配列などで返ります。
例
{{ product.metafields.custom.material.value }}
metafield.type
プロパティメタフィールドの型(single_line_text_field など)です。
書き方
{{ metafield.type }}
例
{{ product.metafields.custom.material.type }}
出力
single_line_text_field
metafield.list?
プロパティリスト型のメタフィールドかどうかです。
書き方
{% if metafield.list? %}
例
{% if product.metafields.custom.files.list? %}複数{% endif %}
公式ドキュメント | 関連TIPS:Shopifyでリスト型のメタフィールドの配列数は.sizeではなく、.countで取得する / ShopifyのLiquidでメタフィールド「ファイル(リスト)」の登録数を取得する方法 | 目次へ戻る ↑
metafields
オブジェクトオブジェクトに付いたメタフィールドを、名前空間(custom など)ごとにまとめたものです。
書き方
{{ product.metafields.custom }}
例
{{ shop.metafields.custom.notice.value }}
metafield_namespace
オブジェクト1つの名前空間に属するメタフィールドの集まりです。
書き方
{{ product.metafields.custom.キー }}
例
{{ product.metafields.custom.size_guide.value }}
metaobject
オブジェクトメタオブジェクト(自分で定義したデータの型)1件分の情報です。
書き方
{{ metaobject.フィールド.value }}
メタフィールドの参照から、または metaobjects から取り出します。
例
{% assign faq = metaobjects.faq['shipping'] %}
{{ faq.question.value }}
プロパティ(1件・名前のみ。クリックで shopify.dev の説明へ)
公式ドキュメント | 関連TIPS:ShopifyのメタオブジェクトのLiquidコード上での参照方法 / Shopifyのコンテンツタイプ「メタオブジェクト」のメタフィールド値をLiquidのコードから呼び出す方法 / ShopifyのLiquidコードでメタオブジェクトを直接参照する方法 | 目次へ戻る ↑
metaobjects
オブジェクトストアのすべてのメタオブジェクトです。タイプとハンドルで取り出します。
書き方
{{ metaobjects.タイプ['handle'] }}
shop.metaobjects は非推奨になり、こちらに置き換わりました。
例
{% for item in metaobjects.faq.values %}{{ item.question.value }}{% endfor %}
公式ドキュメント | 関連TIPS:ShopifyのメタオブジェクトのLiquidコード上での参照方法 / Shopifyのコンテンツタイプ「メタオブジェクト」のメタフィールド値をLiquidのコードから呼び出す方法 / ShopifyのLiquidコードでメタオブジェクトを直接参照する方法 | 目次へ戻る ↑
metaobject_definition
オブジェクトメタオブジェクトのタイプ(定義)と、その中身の一覧です。
書き方
{{ metaobjects.タイプ.values }}
values のループは1回50件までの制限があります。
例
{{ metaobjects.faq.values_count }}件
プロパティ(2件・名前のみ。クリックで shopify.dev の説明へ)
metaobject_system
オブジェクトメタオブジェクトのハンドルやIDなど、システムが持つ情報です。
書き方
{{ metaobject.system.handle }}
例
{{ faq.system.handle }}
Shopify Liquid チートシートの記事
- チートシート索引
- 書き方の基本
- 基本タグ
- テーマタグ
- 文字列フィルター
- 配列・計算フィルター
- 金額・日付フィルター
- 画像・HTMLフィルター
- その他のフィルター
- 商品オブジェクト
- コレクション・カート・注文
- 顧客・ブログ・メタフィールド(この記事)
- グローバルオブジェクト
仕様の参照先:Shopify Liquid リファレンス(shopify.dev)。説明文とコード例は STORE DOJO の独自執筆です。出力例はストアのデータや設定によって変わります。仕様確認:2026年10月。