Use metafields to attach custom size guides to individual products without duplicating content
Shopify metafields let you store custom information — like size charts — directly on each product. Instead of building one generic size guide and hoping it fits every item, you can create different guides for shoes, clothing, and accessories, then link the right one to the right product. Metafields sit in your product data, so customers see the guide that actually matches what they are buying.
The process involves three steps: define a metafield namespace and key in your Shopify admin, create the size guide content (usually as a file or text block), and then assign that content to products that need it. You can display the guide on your storefront using theme code or a Shopify app, depending on your setup.
Key Takeaways
- Metafields are custom data fields you create in your Shopify admin under Settings > Metafields, organized by namespace and key name.
- You can store size guides as file references (PDF uploads), rich text, or plain text, depending on how you want customers to see them.
- Once you define a metafield, you assign it to products individually or in bulk, then display it on your storefront using theme code or an app.
- Different product types (shoes, clothing, hats) can have different metafields pointing to different size guides without affecting each other.
Create a metafield namespace and key in your Shopify admin
Start in your Shopify admin by going to Settings, then Metafields. Click Create namespace and key. You will see a form asking for a namespace (a category name like "size_guides") and a key (a specific field name like "shoe_chart" or "clothing_chart"). The namespace groups related metafields together; the key is the individual field.
For the field type, choose one of three options. File reference lets you upload a PDF or image file that customers download or view. Rich text lets you write formatted text with headings and tables directly in the admin. Single line text works if you want to paste a URL pointing to a size guide hosted elsewhere. Most stores use file reference for PDFs or rich text for inline charts.
After you create the metafield, it appears in your product editor. You do not need to create a separate metafield for each product type — instead, you create one metafield per product type (one for shoes, one for clothing) and assign the right one to the right products.
Assign size guides to products using metafields
Open any product in your Shopify admin and scroll down to the Metafields section. You will see the metafields you created listed by namespace. Click into the field and add your content — upload a file, paste rich text, or enter a URL. Save the product when you are done.
If you have many products that need the same size guide, use bulk editing. From your Products page, select multiple products, click Edit products, find the metafield, and add the same content to all of them at once. This is faster than editing each product individually.
You can also use the Shopify GraphQL API or a bulk import CSV file if you are comfortable with technical tools. This approach works well if you are migrating size guides from another system or managing hundreds of products.
Display size guides on your storefront
Once metafields are filled in, you need to show them to customers. The method depends on your theme. If you use a Shopify theme built after 2020, check the theme settings first — many themes have a built-in option to display metafields on product pages without code changes.
If your theme does not have this option, you can add code to your product template. In your theme editor, open the product template file (usually called product.liquid or product-template.liquid) and add a Liquid code block that pulls the metafield data and displays it. The code looks like this: {{ product.metafields.size_guides.shoe_chart }} (replacing "size_guides" and "shoe_chart" with your actual namespace and key names).
If you do not want to edit code, use an app from the Shopify App Store that displays metafields. Apps like Metafields Editor or custom metafield display apps handle the display for you. Search "metafield display" in the app store to see current options.
Create different guides for different product categories
The power of metafields is that you can create separate guides for shoes, clothing, and accessories without any overlap. Create one metafield called "shoe_size_guide" and another called "clothing_size_guide". Assign the shoe guide only to shoe products and the clothing guide only to clothing products.
This approach keeps your data organized and makes it easy to update one guide without affecting others. If your shoe sizes change, you update the shoe metafield once, and all shoe products automatically show the new guide. Clothing products are unaffected.
You can also create guides for specific brands or collections. If you sell both men's and women's clothing with different sizing, create separate metafields for each. The metafield system scales to as many guides as you need.
Store size guides as files or formatted text
If you choose file reference, upload a PDF, PNG, or JPG. Customers see a download link or embedded preview depending on your theme. PDFs work well for detailed charts with multiple measurements. Images are good if you want a visual size chart that displays inline on the product page.
If you choose rich text, you can write a table directly in the metafield editor using Shopify's formatting tools. Rich text displays as part of the product description without requiring a separate file. This approach is faster to update and does not require file uploads, but it works best for simpler charts.
Test both approaches with a few products to see which fits your workflow. File uploads are better if you have professional-designed charts; rich text is better if you update sizes frequently or want everything in one place.
Update and manage metafields over time
Metafields are not locked once you create them. You can edit the content on any product at any time. If your shoe sizes change, open the shoe product, click the metafield, and update the file or text. The change appears on the storefront immediately.
If you need to change the metafield structure itself (for example, renaming a key or changing the field type), you can do that in Settings > Metafields. Be aware that changing a field type may affect how it displays on products, so test the change on one product first.
Keep a record of which metafields you have created and which products use them. A simple spreadsheet with product names and their assigned metafields makes it easier to manage updates and onboard new team members.
Frequently Asked Questions
Can I use the same metafield for multiple product types?
Yes, but it is usually not a good idea. If you assign a shoe size guide to a clothing product, customers will see the wrong information. It is cleaner to create separate metafields for each product type so you can manage them independently and avoid mistakes.
What happens if I do not add a metafield to a product?
The metafield simply does not display on that product page. If your theme code tries to show a metafield that is empty, it will show nothing or a blank space. This is fine — you only need to fill in metafields for products that actually need them.
Can customers see metafields without code changes?
Not by default. Metafields are stored in your product data but do not automatically appear on the storefront. You need either a theme that supports metafield display, custom code in your theme, or an app to show them to customers.
How do I bulk update size guides for many products at once?
Use Shopify's bulk edit feature: select multiple products from your Products page, click Edit products, find the metafield, and add the same content to all selected products. For very large updates, use a CSV import or the GraphQL API.
Can I use metafields to store other product information besides size guides?
Yes. Metafields work for any custom data — care instructions, material sourcing, warranty information, or product certifications. The same process applies: create the metafield, assign it to products, and display it on your storefront.