Adding 'From' to Variant Prices on Shopify: A Horizon Theme Fix & Beyond

Hey there, fellow Shopify store owners! Ever found yourself scratching your head, wondering why your beautifully set up product variants aren't showing that crucial "from" before the price on your collection pages or homepage? You know, for products that have a price range like "$10.00 - $50.00," you'd expect to see "From $10.00." It’s a small detail, but it makes a big difference in clarity for your customers.

I recently saw a great discussion pop up in the Shopify Community forums about this very issue. Our friend omoot1, who’s running the Horizon theme, brought up this exact point. They were seeing products with multiple variants, and while they expected the word "from" to appear before the lowest price on their homepage and collection pages, it just wasn't happening. It’s a common frustration, and honestly, it’s a valid one! Many themes do include this by default, so it can be jarring when yours doesn't.

Why Does This Happen?

Often, it comes down to how a specific theme is coded. Some themes are designed to automatically detect if a product has multiple variants with different prices and then display "From" as a prefix. Others, like omoot1's Horizon theme seems to be doing in this case, simply display the lowest variant price without any prefix, or perhaps the full range without clarity. It's not a bug, per se, but rather a design choice or oversight that can easily be remedied with a little bit of code tweaking.

The Community's Solutions: Two Paths to "From"

Thankfully, the community had some excellent suggestions to tackle this. NKCreativeSoulutions jumped in with two solid approaches, both involving a bit of theme code modification. Don't worry, even if you're not a coding wizard, I'll walk you through them step-by-step. Just remember, always back up your theme before making any changes!

Method 1: Adding "From" with CSS ::before

This method is often preferred for its simplicity and for keeping your core Liquid files cleaner. It uses CSS pseudo-elements to inject content without directly altering the HTML structure. Think of it like adding a sticker to a specific element on your webpage.

Step-by-Step Instructions for CSS ::before:

  1. Backup Your Theme: Seriously, do this first! From your Shopify admin, go to Online Store > Themes. Find your current theme, click Actions > Duplicate. This creates a safe copy.
  2. Access Your Theme Code: Again, from Online Store > Themes, click Actions > Edit code on your live theme (after duplicating, of course!).
  3. Locate Your CSS File: In the left-hand sidebar, look for a file ending in .css or .scss.liquid. Common names include theme.css, base.css, sections-main-product.css, or sometimes within a assets folder. You might need to check a few.
  4. Inspect the Price Element: This is where a little browser developer tool magic comes in handy.
    • Go to your live store's homepage or a collection page where the price is displayed.
    • Right-click on the product price (e.g., "$10.00") and select "Inspect" (or "Inspect Element").
    • In the developer console that opens, you'll see the HTML structure and associated CSS. Look for the HTML element that wraps the price. It might be a or
      with a class name like .price-item, .product-price, .price__regular, or similar. Make a note of this class or ID.
  5. Add the CSS Code: Once you've identified the correct CSS selector (let's say it's .price-item for example), scroll to the very bottom of your chosen CSS file and add the following code:
    .price-item::before {
        content: "From ";
    }
    Important: Replace .price-item with the actual class or ID you found in step 4. If your theme uses multiple price classes, you might need to add this for each one, or find a more general parent class.
  6. Save and Test: Click "Save" and then refresh your store pages (homepage, collection pages) to see if "From" now appears before your variant prices.

Method 2: Direct Code Modification in Liquid

This approach involves directly editing the Liquid code that renders the price. It gives you more control and ensures the "From" text is part of the HTML itself, rather than injected by CSS. NKCreativeSoulutions suggested searching for the "price part" in the code, and that's exactly what we'll do.

Step-by-Step Instructions for Liquid Code Modification:

  1. Backup Your Theme: Again, crucial! (See Step 1 in Method 1).
  2. Access Your Theme Code: (See Step 2 in Method 1).
  3. Identify Relevant Liquid Files: This is the trickiest part, as price rendering can happen in several places. Common files to check include:
    • sections/product-card.liquid (for collection/homepage product grids)
    • snippets/product-price.liquid or snippets/product-card-details.liquid (if your theme uses snippets for price)
    • sections/main-product.liquid (for the actual product page, though omoot1's question focused on homepage/collections)
    • Any file within the sections or snippets folder that contains the word "price" in its name.
  4. Search for the Price Code: Inside these files, use the search bar (usually Ctrl+F or Cmd+F) and search for keywords like:
    • price
    • product.price
    • variant.price
    • price_min or price_max
    • The actual currency symbol (e.g., $) or your store's currency code.
    You're looking for the Liquid code that outputs the price, often using filters like {{ product.price | money }} or {{ variant.price | money }}.
  5. Add the "From" Prefix: Once you've located the line (or block) of code responsible for displaying the price for products with multiple variants, you'll need to add a conditional statement.

    A common pattern looks something like this:

    {% if product.has_ false %}
        From {{ product.price_min | money }}
    {% else %}
        {{ product.price | money }}
    {% endif %}

    This code snippet checks if the product has multiple variants (i.e., has_only_default_variant is false). If it does, it displays "From" followed by the minimum price. Otherwise, it just shows the regular price. You might need to adapt this slightly based on your theme's specific Liquid structure. For instance, some themes might use product.first_available_variant.price or similar for the base price.

    Crucial Tip: Look for the code that displays the price range or the lowest price for variant products. You'll want to insert "From " right before that specific output.

  6. Save and Test: Save your changes and thoroughly check your homepage, collection pages, and product pages to ensure the "From" prefix appears correctly and hasn't introduced any display issues.

Final Thoughts & Best Practices

While both methods get the job done, the CSS ::before method is generally quicker for visual additions like this, provided you can target the correct CSS class. The Liquid modification offers more robust control and ensures the text is present in the HTML itself, which can be better for SEO in some cases, though for a simple "From," CSS is usually fine.

Whichever path you choose, remember that theme customizations, especially those involving code, always carry a small risk. That's why duplicating your theme before you start is so vital! If anything goes wrong, you can always revert to your backup. And if you're ever unsure, don't hesitate to reach out to a Shopify expert or your theme's support team.

Getting these small details right really polishes your store's professional look and helps your customers understand your product offerings more clearly. Happy customizing!

Share:

Use cases

Explore use cases

Agencies, store owners, enterprise — find the migration path that fits.

Explore use cases