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)
- Go to your WordPress dashboard and navigate to Appearance > Customize.
- Look for a section titled “Additional CSS” or similar (might vary depending on your theme).
- Paste the following code:
CSS
.related.products { display: none; }
- Click “Publish” to save the changes. This will hide the related products section on all single product pages.
![](https://b1602992.smushcdn.com/1602992/wp-content/uploads/2024/05/Screenshot-showing-Additional-CSS-for-removing-Related-Products-1024x495.png?lossy=2&strip=1&webp=1)
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)
- 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.