Declutter Your Store: How to Remove Related Products in WooCommerce

When you view a single product page in WooCommerce (the default e-commerce plugin for WordPress), a section featuring “related products” often appears at the bottom. This section can be helpful for upselling or cross-selling, but it might also clutter your product page. Here’s how to get rid of it:

Option 1: Using Custom CSS (Easy)

  1. Go to your WordPress dashboard and navigate to Appearance > Customize.
  2. Look for a section titled “Additional CSS” or similar (might vary depending on your theme).
  3. Paste the following code:

CSS

.related.products { display: none; }
  1. Click “Publish” to save the changes. This will hide the related products section on all single product pages.

Option 2: Using a Plugin (Easy)

There are plugins like “NS Remove Related Products” that allow you to disable the related products section with a few clicks. Search for such plugins in the WordPress plugin directory and follow the installation and activation instructions.

Option 3: Using Code Snippets (For Developers)

  1. If you’re comfortable with code, you can achieve this by adding the following code to your child theme’s functions.php file:

PHP

remove_action( 'woocommerce_after_single_product_summary' , 'woocommerce_output_related_products' , 20 );

Important: Always use a child theme to avoid losing your customizations during theme updates.