Metafields used by Sublime

A few parts of Sublime read product information from metafields instead of from a setting, so each product can show its own label, stats or icons. Here's each metafield the theme looks for, what it expects, and how to create it.

Metafields at a glance

custom.highlight Single line text. A short label in the top-left corner of the product card, such as “Bestseller” or “Back in stock”. Products without a value show no label.
sublime.key_stats Rich text. The product's key stats, one per line as value: label (for example 20g: Protein). Used by the Key stats block on the product page and the dock's Info panel on product cards.
reviews.rating Rating. The star rating on product cards, the product page's Rating block and the Ratings row in Product comparison. Filled in by your reviews app.
reviews.rating_count Integer. The number of reviews shown next to the stars. Also filled in by your reviews app.
Your own key Used by the product card's Icon list (Theme settings → Product card), the Metafield row in Product comparison and the Quiz. You type the namespace and key into the setting.

Create a metafield definition

You only need to create custom.highlight and sublime.key_stats yourself (plus any of your own for the icon list, comparison or quiz). The review metafields come from your reviews app.

  1. In your Shopify admin, go to Settings → Custom data.
  2. Under Metafield definitions, click Products, then Add definition.
  3. Enter a Name (for example “Highlight”).
  4. Edit the Namespace and key so it matches exactly, for example custom.highlight or sublime.key_stats. Shopify suggests one based on the name, so check it before you continue.
  5. Click Select type and choose the type from the table above: Single line text for the highlight, Rich text for key stats.
  6. Click Save.
  7. Open a product in Products, scroll to Metafields, fill in the new field and save. Repeat for each product that needs it.

Namespace and key must match exactly: The theme looks metafields up by name. custom.highlights or Custom.Highlight won't be found, and the product card will simply show no label.

Product highlight

custom.highlight adds a label over the top-left corner of the product image on every product card, on collection pages, featured collections and search results. Keep it to two or three words so it doesn't cover the product. It's separate from the automatic sale, new and sold-out badges in Theme settings → Product badges.

Key stats

sublime.key_stats holds a product's headline numbers: protein per serving, battery life, weight. Write one stat per line, with the value before the colon and the label after it:

  • 20g: Protein
  • 12h: Battery life
  • 250ml: Volume

Lines without a colon are skipped. The stats appear in two places:

  • Key stats block on the product page. Add the block, then click Connect dynamic source next to its Stats field and choose the key stats metafield. You can also type stats straight into the field if every product shares them.
  • The dock's Info panel on product cards in Featured collection and Image with product cards. The theme reads this metafield automatically. Products without key stats simply don't offer the Info panel.

Use rich text, not multi-line text: The theme reads key stats paragraph by paragraph, which only works with the Rich text type. Press Enter after each stat so each one is its own paragraph.

Ratings and reviews

Sublime shows stars from Shopify's standard product rating metafields, reviews.rating and reviews.rating_count. You don't create these yourself: most reviews apps (Judge.me, Yotpo, Okendo and others) write to them automatically, though some need it switched on in the app's settings. On product cards, stars only show when rating display is switched on in Theme settings → Product card.

Icon list on product cards

The product card can show a row of small icons with short text (“Vegan”, “Free returns”) under each product. Switch on Enable icon list in Theme settings → Product card and enter the metafield's namespace and key in Metafield key, for example custom.icons.

The metafield should be a list of metaobjects, where each entry has an icon field (an image file, or the name of one of the theme's icons as single line text) and a text field (single line text). Create the metaobject first under Settings → Custom data → Metaobject definitions, then a product metafield of type Metaobject, set to List of entries.

Metafields you name yourself

  • Product comparison: a Metafield row compares any product metafield. Enter it as namespace.key, or variant.namespace.key for a variant metafield. Single line text, lists of single line text, and metaobject references are shown. Other types leave the cell empty.
  • Quiz: Metafield key names a list metafield the quiz matches answers against. The same metafield must also be added as a product filter in Shopify's Search & Discovery app, or matching won't work.

Connect any setting to a metafield

Most text, image and link settings in the theme editor have a Connect dynamic source button next to them. Use it to fill a setting from a metafield instead of typing a fixed value, so one template can show different content for every product, such as a different size chart image or care instructions.

The highlight label isn't showing

Check that the definition's namespace and key is exactly custom.highlight, that its type is single line text, and that the product has a value saved. Labels only appear on product cards, not on the product page itself.

The dock's Info panel is missing for a product

That product has no usable key stats. Make sure sublime.key_stats is a Rich text metafield and each line has a colon separating the value and the label.

Star ratings don't appear

Your reviews app has to write to Shopify's standard rating metafields. Check its settings for an option like “sync ratings to Shopify” or “product rating metafields”, and make sure ratings are switched on in Theme settings → Product card.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.