This article explains the complete setup of the Related Products for WooCommerce plugin that displays custom-related products based on category, tags, or products for your store.
Related products for the WooCommerce plugin allow you to display custom-related products on the basis of category/tags/products. Using the plugin you can do the following.
- Link related products of your choice by category, tags, and other products
- Slider for related products
- Shortcode [wt-related-products product_id=”19″]to display related products anywhere on your site
- Inbuilt ability to resolve theme conflict.
- Sort the related products by Product title, Date, Slug name, Last modified or random.
- Show the same set of related products for their translated versions as well when using WPML.
- Provision to exclude out-of-stock products from related products.
- Ability to exclude products from specific categories from appearing in related products.
- Provision to import related products using code snippets, for guidance, refer to the article Import related products.
From the WordPress dashboard, navigate to WooCommerce > Related products.
Custom Related Products Settings
Following is the settings window of the plugin.
Choose working mode
- Custom related products: Displays related products as per the settings done in this plugin. You will get full customization options. (Recommended).
- Default related products: Works on WooCommerce’s default related products settings with limited customisations.
- Remove related products: Removes the related products section from your site entirely.
Show heading as
Insert a text that will appear as a heading for the related products.
Globally relate products by
Choose to display related products for all products based on category, tag, or both. However, you can override this functionality and assign related products for each product.
Sort related products
- Order by: Sorts the related products based on selected title, name, date, random order, or on last modified item.
- Order: Arrange the ‘Order by’ selection in ascending or descending order.
Number of products to display
Enter the maximum number of products to display as related products. Defaulted to 3 which means only 3 products will be displayed as ‘Related Products’ for a particular product. Increase the count to display more related products.
Exclude out of stock products
Enable to exclude out of stock products from displaying on the related products section.
Enable to display related products in a slider. The user can use the arrows within the slider to view the products.
For translated products
WPML: Use original product ID: Enable to display related products for translated products based on original product ID. Note: Ensure that each product has a corresponding translated product on your site.
Override theme conflicts
Override theme’s template: Enable to override the theme’s existing template for related products. If disabled, the above settings may not be reflected in the front end.
Finally, save the settings.
Setup related products globally based on category, tag or both
From the plugin settings window, scroll down to the option ‘Globally relate products by‘.
You can choose to relate products either by category or tag or even both. Then, save the settings. Switch to the front end. You can see related products for all products on your site.
Setup related products individually for each product
Link related products for each product
Follow the steps to link related products for a particular product of your store.
Step 1: Choose a product
Go to the Product page, choose a particular product and click on Edit. In the example below, choose the product ‘Sticky Notes’ and edit it to add related products.
Step 2: Open the Linked Products tab from product data section.
Here, you get options to link related products on the basis of:
Link related products by ‘category’
From the Linked Products tab, go to Related categories. Select appropriate categories that will appear as ‘Related Products’ for the chosen product.
For the product ‘Sticky Notes‘, let’s choose the category ‘Accessories‘.
Update the product. This will display all products under the category ‘Accessories’ as related products for sticky note.
Link related products by ‘tags’
From the Linked Products tab, go to Related tags. Select appropriate tags that will appear as ‘Related Products’ for the chosen product.
For the product ‘Sticky Notes‘, let’s choose the tag ‘stationery‘.
Update the product. Following is a screenshot of related products by tags.
Link related products by ‘products’
From the Linked Products tab, go to Related products. Select appropriate products that will appear as ‘Related Products’ for the chosen product.
For the product ‘Sticky Notes‘, let’s choose multiple products.
Update the product. Following is a screenshot of related products by products.
From the Linked Products tab, go to Exclude categories. Choose appropriate categories to exclude them from appearing as related products for a product.
Update the product. The products under the excluded categories will not appear as related products.
How to resolve theme conflict?
From the plugin settings window, scroll down to the option ‘Override theme’s template‘. Enable the option to override the theme’s template.
The plugin will display related products based on the plugin settings. Therefore, it resolves all the issues caused by the theme.