Skip to content
Moodboard Creations
  • Themes
  • Partner programme
Support
← Journal

How to add a metafield to the Country block

Show a product's country of origin and flag on product pages and product cards in Vincent by connecting the Country block to metafields.

Published
January 2025
Applies to
Vincent theme →
Need help?
Contact support

If you want to add the country name and flag to your product on the product page and product card, metafields help by centralising and automating product-specific data. This saves time and minimises manual effort, especially when dealing with many products.

For general guidance on creating and managing metafields in Shopify, refer to the official Shopify documentation.

Why use metafields?

Manually adding country blocks for each product can be time-consuming. Metafields allow you to:

  • Link product-specific data (such as country names and flags) directly to your product templates.
  • Streamline repetitive tasks, saving time and effort.
  • Ensure consistency across product pages.

Step 1: Add metafield definitions for the Country block

  1. From your Shopify admin, go to Settings > Custom data > Products.
  2. Click Add definition.
  3. Enter a name for the metafield (for example "Country name").
  4. For the country name, set the type to Single line text. For the country flag, create a second definition with the type File.
  5. Click Save to finalise each definition.
Creating the Country name metafield definition with the single line text type.
Creating the Country flag metafield definition with the File type.

Step 2: Link the metafields to a product

  1. In your Shopify admin, navigate to Products and select the product you want to update.
  2. Scroll down to the Metafields section.
  3. Enter the country name and upload the country flag in the fields for the definitions you created.
  4. Click Save to apply the changes.
A product's Metafields section with the country name entered and a flag image uploaded.

Step 3: Connect the metafields to the product template

  1. From your Shopify admin, go to Online Store > Themes.
  2. Select your Vincent theme and open the Product template.
  3. In the Product information section, find the Country block.
  4. Click the Connect dynamic source button next to the country name and flag fields, and pick the matching metafields.
  5. Make sure the product has metafield values assigned so the block displays correctly, then click Save.
Connecting the Country block's name and flag settings to the metafields.
The dynamic source picker listing the Country name and Country flag metafields.

Testing your setup

After completing the steps, open a product page to confirm the country block displays correctly. Below is an example of a properly configured country block:

A product page showing the country name and flag beside the product details.

Adding country blocks to product cards

Once the product metafields are in place, the same values can be shown on product cards. Open the section that lists your products, enable the country option in its settings, and connect it to the same metafields.

Product card settings with the country option connected to the metafields.
A collection page with the country flag and name shown on each product card.
← How to translate your Vincent theme with the Translate & Adapt appHow to add a metafield to the Chart block →
Moodboard Creations

Shopify themes, designed with intent.

Explore

  • Themes
  • Partner programme

Support

  • Contact support
  • Vincent documentation
  • Agnes documentation

© 2026 Moodboard Creations. All rights reserved.

  • Support policy
  • Refund policy