Learn how to fix Divi footer not showing or updating issues in WordPress. Easy steps to troubleshoot and solve footer problems fast.
How to Add Related Products to WooCommerce Product Pages

Table of Contents
- Why Add Related Products in WooCommerce?
- Ways to Add Related Products in WooCommerce
- Best Practices for Related Products
- FAQs
Why Add Related Products in WooCommerce?
Adding related products to your WooCommerce store helps improve user experience and increases sales by recommending relevant products to customers. It encourages buyers to explore more items and increases the average order value.
Ways to Add Related Products in WooCommerce
1. Default WooCommerce Related Products
WooCommerce automatically displays related products based on product categories and tags. You don’t need to configure anything for this feature to work.
2. Using Upsells and Cross-Sells
WooCommerce allows you to manually select products for upsells and cross-sells:
- Upsells: Suggested alternatives to the current product (better versions or higher-priced items).
- Cross-sells: Related products shown on the cart page to encourage additional purchases.

To set this up:
- Go to Products > All Products in your WordPress dashboard.
- Edit the product where you want to add related products.
- Scroll down to the Product Data section.
- Click on the Linked Products tab.
- Add products to the Upsells and Cross-sells fields.
- Click Update to save changes.
3. Using a WooCommerce Plugin
Several plugins allow more customization for related products. Some popular options include:
- Related Products for WooCommerce
- WooCommerce Product Recommendations
- YITH WooCommerce Frequently Bought Together
You can install these plugins from the WordPress plugin repository and follow their setup guides to customize related product displays.
4. Manually Adding Related Products with Code
If you want more control over how related products appear, you can add custom code to your theme’s functions.php
file.
Example code to display specific related products:
add_action('woocommerce_after_single_product_summary', 'custom_related_products', 15);
function custom_related_products() {
woocommerce_related_products(array(
'posts_per_page' => 4,
'columns' => 4,
));
}
This code displays four related products in a row below the product description.
Best Practices for Related Products
- Ensure relevance by selecting related items carefully.
- Use high-quality images and clear descriptions.
- Avoid cluttering the page with too many recommendations.
- Test different layouts to find the most effective placement.
FAQs
Can I disable related products in WooCommerce?
Yes, add this code to your functions.php
file:
remove_action(‘woocommerce_after_single_product_summary’, ‘woocommerce_output_related_products’, 20);
How do I change the number of related products displayed?
Add this code to your functions.php
file:
add_filter(‘woocommerce_output_related_products_args’, ‘change_related_products_count’);
function change_related_products_count($args) {
$args[‘posts_per_page’] = 4; // Adjust the number as needed
return $args;
}
Are related products the same as upsells and cross-sells?
No, related products are automatically generated based on categories and tags, whereas upsells and cross-sells are manually assigned.
This Post Has 0 Comments