WooCommerce is a powerful plugin for WordPress that allows you to create and manage an online store. One of the features of WooCommerce is that it automatically displays related products at the bottom of each product page. Related products are products that share the same category, tag, or attribute as the current product. They are meant to help customers find more products that they may be interested in and increase your sales.

However, you may not want to show related products on your product pages for various reasons. For example, you may want to simplify your product page layout, improve your site speed, or avoid showing products that are not relevant or competitive to your current product. In this tutorial, We will show you how to remove related products WooCommerce using three methods: using a plugin, using CSS, or using code snippets. You can choose the method that suits you best depending on your preference and skill level.

Method 1: Using a Plugin

One of the easiest ways to remove related products WooCommerce is to use a plugin that does the job for you. There are many plugins available that can help you customize your WooCommerce store, but one of the most popular and reliable ones is [WooCommerce Customizer]. This plugin allows you to change various aspects of your WooCommerce store without touching any code. You can change the number of products per row, the number of products per page, the add to cart button text, the sale badge text, and more.

To use this plugin, follow these steps:

  1. Install and activate the plugin from your WordPress dashboard.
  2. Go to WooCommerce > Settings > Customizer.
  3. Under Product Page, you will see an option called Related Products. Uncheck the box next to Enable Related Products.
  4. Save your changes and check your product pages to see the effect.

Method 2: Using CSS

Another way to remove related products WooCommerce is to use CSS. CSS stands for Cascading Style Sheets and it is a language that defines how HTML elements are displayed on a web page. You can use CSS to hide or modify the appearance of any element on your site, including related products.

To use this method, follow these steps:

  1. Go to Appearance > Customize > Additional CSS from your WordPress dashboard.
  2. Add the following CSS code in the text box:
/* Hide related products */
.related.products {
  display: none;
}
  1. Save your changes and check your product pages to see the effect.

Method 3: Using Code Snippets

Another way to remove related products WooCommerce is to use code snippets. Code snippets are small pieces of code that you can add to your site to achieve a specific functionality or customization. This method requires some basic knowledge of PHP and WordPress functions, but it gives you more control and flexibility over your WooCommerce store.

To use this method, follow these steps:

  1. Open your WordPress theme’s functions.php file using a code editor or a FTP client.
  2. Add the following code snippet at the end of the file:
// Remove related products Woptu.com
function woptu_remove_related_products( $args ) {
  // Set the number of related products to zero
  $args['posts_per_page'] = 0;
  // Return the modified arguments
  return $args;
}
// Hook into woocommerce_output_related_products_args filter
add_filter( 'woocommerce_output_related_products_args', 'woptu_remove_related_products' );
  1. Save your changes and check your product pages to see the effect.

We hope this blog tutorial was helpful for you. If you have any questions or feedback, please leave a comment below. Thank you for reading!

Categorized in:

Tagged in:

, ,