How to show related products from the same category or subcategory in WooCommerce? 

How to show related products from the same category or subcategory in WooCommerce? 

Want to show related products from the same category or subcategory in your WooCommerce related products field? Here is a solution for you.

Showcasing the most prominent items as WooCommerce related products on your store is a proven strategy that can help improve your store sales. Related products encourage customers to purchase more products. It can even persuade customers to go for the products that they haven’t initially intended to purchase.

You can set up related products in your store in a number of ways. One is the default upsell and cross sell section in WooCommerce. You can utilize the prime locations on your WordPress product and cart page to upsell and cross-sell products. The aim should be to improve the average order value of your cart.

In addition to these, the free plugin from WebToffee Related Products for WooCommerce enables you to add related products from the same category to your WooCommerce store. We will look into detail how you can set up related product fields with products belonging to the same category or subcategory using this plugin.

related products for WooCommerce plugin

WooCommerce Related products is a free plugin from WebToffee that enables you to add extra ‘Related products’ widgets to your product pages. You can use the widgets to showcase and promote your products in the store. For example, add the product that is receiving the least attention to the related products section to ensure optimum visibility of the product.

Likewise, you can also add any products that want to add to the related products list. The plugin even enables you to add products related to categories, tags, or attributes. You can change the section name, adjust the number of products to be displayed, arrange the products in a particular order, and more.

A slider can also be employed to show related products in the product recommendation section with this plugin. You can make use of a bxSlider or a Swiper slider for this purpose. Some of the other features of the plugin include setting the maximum number of products to be displayed in mobile, desktop, and tablet views. You can also configure to hide products that are out of stock with this plugin.

You will have to install and activate this plugin in your WordPress admin console before you can set it up. To install the plugin, go to your WordPress admin console and click on Plugins > Add New in the navigation bar. Search for the plugin ‘Related products for WooCommerce’ in the search bar. Once you locate the plugin click on Install Now and then on Activate to activate the plugin.

How to set up the product relations widget with related products in the same category?

You can relate products by categories or subcategories. Moreover, you can set up related products globally (that is, a single product relation for all products) or you can set up local and customized product relations for each product in your store.

Add products related by the same category to all product pages

To set products related by the same category to the related products widgets globally,

  1. Go to WooCommerce > Related Products.
  2. Select the working mode as Custom related products.
  3. Under the option Globally relate products by select Category.
  4. Sort the related products by criteria like Popularity or Price under Order by.
  5. Choose whether you want to display the products in ascending or descending order.
  6. Select the number of products to be displayed.
  7. Select and choose a slider if you want to display the WooCommerce products related by categories in a slider.
  8. Make all the other necessary changes and click on Save Changes to save the changes.
Add products related by the same category to all product pages

This will add a new section named ‘Related Products’ to all product pages in your store. Each section will contain products belonging to the same category as the main product.

Add products related by category to individual product pages

If you want to add the product relations on the individual products page instead of setting up a global configuration,

  1. Go to Products > All Products and select the product to which the Related Products field has to be added.
  2. Tap on Linked Products in the Product data widget.
  3. Add the categories that you want to relate to the product within the Related categories section. Only the products belonging to the specified category will be allowed to be displayed in the Related products field.
Add products related by category to individual product pages

Here only the products belonging to the ‘clothing’ category will be displayed in the related products field of this product.

How to set up a product relations widget with related products in the same subcategory?

You can relate a product with all the other products on its own or any other subcategory with the ‘Related Products for WooCommerce’ plugin. You can either individually add product relations with a specific subcategory or you can use shortcodes to globally relate products with selected product subcategories.

Add products related by subcategories to all product pages

You will have to use a custom code snippet to relate WooCommerce products by their respective subcategories.

To do this, you will have to Insert the code snippet given below into the functions.php of the active theme file.

Add products related by subcategories to individual product pages

To locally add product relations with specific subcategories,

  1. Go to Products > All Products and click on the product that you want to relate with WooCommerce product subcategories.
  2. Click on Linked Products and add the product subcategories that you want to relate to this product within the Related categories field.

Only the products belonging to the specified subcategory will be added to the related products widget.

Add products related by subcategories to individual product pages

This is how a related products widget with products belonging to a specific category or subcategory will look like.

Sample related products field in WooCommerce product page

Conclusion

Relating products can help improve the visibility of your catalog. It can also have a significant impact on increasing the average order value of your orders. A related products section in your WooCommerce store can also remind people of the things they may miss. In this article, we have specifically looked into adding products belonging to the same category or subcategory to the related products section with the help of the free plugin ‘Related Products for WooCommerce’.

Do check out the article on displaying popular products on your WooCommerce, if interested.

Hope this article was of interest to you. Do let us know what you think of this in the comments.