You can create tabs in two different ways:
- Using a page, shown on all product pages.
or - Using metafields, shown only on products with metafield values.
I want to show the tab on all product pages
This is the easiest option to set up and is useful for general product information like shipping and return policies, universal size charts, and anything else that applies to your entire product line.
- In the theme editor, navigate to the Product page template by clicking on Products, then Default product from the page selector.
- Under the Product section in the left sidebar, click on Add Block. If you don't see this option, you may need to hover your mouse pointer between existing blocks. A blue plus (+) button should appear, allowing you to add a new block.
- Select the Tab block and position it as desired within your product template.
This tab and the content you include in the block settings will appear for all products assigned to use this template.
I want to show the tab on specific product pages
Create product metafields
- From your Shopify admin, go to Settings > Metafields and metaobjects, then select Products under Metafield definitions.
- Click Add definition to create a new metafield. You’ll need to create two metafields for each tab: use a single-line text metafield for the tab title and a multi-line text metafield for the tab content.
Repeat this process for each tab you want to add. For example, creating two tabs requires four metafields.
Assign metafield values
For each product, fill in the metafield values with the relevant information. Only products with values set for these metafields will display the corresponding tab.
- In your Shopify admin, go to Products and open the product you'd like to add the product tab.
- Scroll to the Product metafields section, enter content for the metafields, and click Save.
Add tab in the product page
- In the theme editor, navigate to the Product page template by clicking on Products, then Default product from the page selector.
- Under the Product section in the left sidebar, click on Add Block. If you don't see this option, you may need to hover your mouse pointer between existing blocks. A blue plus (+) button should appear, allowing you to add a new block.
- Select the Tab block and position it as desired within your product template.
- Use the Connect dynamic source (database icon) and click on Tab content from page.
- Click Template > Products to view the available product metafields.
- Select the metafield you want to connect to the tab.
- Repeat these steps to link a metafield to both the tab title and tab content.
Here's a video that shows you step-by-step how to set up custom product tabs using metafields so that they appear only on specific product pages.