Story theme
Story v2
Story v2
  • Story theme documentation
  • online store 2.0
    • The new experience
  • Header
    • Header styles
    • Toolbar
    • Navigation images
    • Image menus
    • Transparent header
    • Mega-menu navigation
    • Drop-down navigation
  • Sections
    • How to use sections
      • Adding a section
      • Hiding a section
      • Reordering sections
    • Section blocks
    • Complete list of sections and blocks in Story
  • Collections
    • Product badges
      • Sale badge
      • Savings badge
      • Sold-out badge
      • Custom badges
      • Badge settings
    • Collection filtering
      • Custom filter options
    • Collection sorting
    • Collection navigation
    • Feature image
  • Products
    • Upsell promotions
      • How to setup
      • Static upsell promotion
      • Custom upsell promotion
    • Product tabs
      • Static product tabs
      • Unique product tabs
    • Color swatches
    • Inventory countdown
    • Pre-order products
    • Size Charts
      • Static size chart
      • Unique size charts
      • Creating pages
    • Product image sizes
  • Cart
    • Cart styles
    • Shipping message
    • Estimate shipping calculator
    • Cart settings
  • Pages
    • Page navigation
    • How to use page templates
      • Story page templates when using a different theme
    • Contact page
    • Lookbook
    • Team
    • Timeline
  • Blogs
    • Blogs
    • Articles
  • Settings
    • Tile decoration
    • Enable container
  • Updates
    • Story Releases
    • Check your theme version
    • How to download latest version
  • Tips
    • Where to make CSS changes
    • How to add a line break in your headings
  • Advanced
    • Story tutorials
    • Remove Shopify link in footer
  • Contact
    • Share preview link
  • Earlier versions
    • Story v1
Powered by GitBook
On this page
  • How to setup
  • Quick setup for experienced users
  • Full detailed step-by-step setup
  • Product setup
  1. Collections
  2. Product badges

Custom badges

Promote products with your own custom badges that you create and assign to individual products

PreviousSold-out badgeNextBadge settings

Last updated 3 years ago

Story theme allows you to create your own unique product badges to associate with any of your products. When using Shopify's dynamic source feature (also known as metafields), you can create individual product badges for any of your products.

Once a badge metafield is defined (see instructions below), any of your products can display a custom badge. There are no limits to the number of badges you can create and use. All your products will be able to display a custom badge or use the built-in badges for sales and out-of-stock inventory.

How to setup

Quick setup for experienced users

The most important part of setting up this metafield is to use the namespace and key of:

theme.badge

See the example here:

Full detailed step-by-step setup

The first step is to define a custom metafield that Story theme supports.

Start in your Shopify Admin -> Settings and choose Metafields from the left panel and then click on Products (click images to zoom):

Choose the Add definition button to begin. Choose a name, we'll use badge. Next, we will use a custom namespace. This is required for custom badges. Change the default namespace from my_fields to theme

Change to:

theme.badge

Example:

Add a description and choose Select content type.

Choose Text and we will use Single line text which is the default choice:

Save your new product metafield. Now we can use this custom theme.badge metafield with any of our products.

Product setup

Now that our custom metafield has been defined, we can easily add a custom badge to any of our products.

The next and final step is to edit any of your products in the Shopify Admin -> Products and update the new badge metafield. Scroll to the bottom of the product setup page:

Update the Product badge metafield with the custom badge name:

Save your product and preview on any product grid view like Collection pages:

Example of custom badge call "Best Seller" assinged to a product
Under Metafields, click on Products
Use the Add definition button to begin
Change from my_fields to theme
Don't skip this step
Choose Text for the Content type
Product metafields are located at the bottom of the page