PRODUCT - Adding different tabs per product
In this article, we have explained how you could add global tabs to your product pages. Global tabs are tabs that are shared for all your products.
However, it may be more useful to be able to create tabs that are specific to one product (like specifications, ingredients...).
To that extent, our themes offer a feature called "unique tab". Unique tabs allow you to create pages that are attached to your products using a tag mechanism.
Create a new page in Shopify admin. This page will hold the content of your unique tab. You can create a page in the "Pages" section of your Shopify admin (if you are already logged, you can click here directly).
Once you have created your page, we need to retrieve the page handle. To get the page handle, open the page in the admin, and at the bottom, you will find a box called "Search engine listing preview".
The handle is what comes after the "/pages/" segment in the address. In this example, the handle is simply shipping:
Make sure to write down the handle, we'll need it later.
Then, we will need to inform the theme that we want to display this page's content as a tab for a given product.
To do that, in your Shopify admin, open the product that you want to edit. At the bottom right of the product page, you should find a section called "Tags". We are going to add a special tag that allows to instruct the theme to use our page.
For using the first unique tab, you will need to add the tag __tab1:page-handle. For the second unique page, you will need to add the tag __tab2:page-handle. the tag starts with two consecutive underscores! If you only write one, it will not work.
To take our previous example, the tag would simply by __tab1:shipping:
Repeat the process by creating new pages, and attaching them to your products.
Finally, we need to configure the theme. The process slightly differs based on the theme you are using.
For Focal, Trademark and Prestige themes, you have nothing else to do. As soon as you add the tab to your product, it will automatically appears in the product page.
Kagami allows you to re-order product tabs. Because of that, the theme cannot know in advance where to display the unique tab. Therefore, we are going to need to manually add the tab.
To do that, in the Theme Editor, navigate to a product page, so you can have access to the dedicated Product section setting.
Then, click on "Add content", and select either "Unique tab 1" or "Unique tab 2":
If you add the "Unique tab 1", it will displays the page attached to the __tab1:* tag. Similarly, if you add the "Unique tab 2", it will displays the page attached to the __tab2:* tag.
Avoiding usage of page
This is pretty nice, however this requires the usage of a lot of pages. Hopefully, our theme comes with a more advanced feature that allows you to add unique tab without the usage of page. You can learn more here.