How to Ditch Those Pesky Related Products on Your WooCommerce Site (Even if You’re Not a Tech Whiz!)
So, you’ve got a shiny new (or maybe not-so-new) WooCommerce store. Everything’s humming along nicely, except… those related products at the bottom of your product pages. Maybe they’re showing irrelevant items, cluttering up the page, or even worse, displaying competitor products! Don’t worry, you’re not alone. Many WooCommerce store owners want to control or remove related products. Luckily, it’s easier than you think.
This guide will walk you through several methods to remove (or tweak!) those related products, even if you’re not a coding ninja. We’ll break it down into easy-to-understand steps, with real-life examples and explanations of why each method works.
Why Remove Related Products? A Real-Life Scenario
Imagine you’re selling high-end, handcrafted leather wallets. A customer lands on a beautiful brown leather wallet page. However, the “Related Products” section below shows cheap, Explore this article on How To Make Add To Cart Button Bigger Woocommerce mass-produced wallets from a third-party vendor. This could:
- Devalue your brand: Showing cheaper alternatives can cheapen the perceived value of your handcrafted wallets.
- Distract the customer: Instead of focusing on the current product and adding it to the cart, they might click away to something cheaper, or worse, a competitor’s product.
- Reduce conversions: A cluttered page with irrelevant items can confuse and overwhelm the customer, leading them to abandon their purchase.
Removing or carefully curating related products can improve the customer experience, boost conversions, and protect your brand image.
Method 1: Theme Customizer (The Easiest Option!)
This is often the quickest and simplest way to remove related products. However, it depends entirely on your chosen WooCommerce theme. Many modern, well-designed themes offer this as a built-in option.
Here’s how to check:
1. Go to your WordPress Dashboard: Navigate to Appearance > Customize.
2. Look for WooCommerce or Product Options: Explore the theme customizer options for sections specifically related to WooCommerce or products. Common titles might include “WooCommerce,” “Product Page,” or “Shop Settings.”
3. Find the “Related Products” Setting: Within those sections, look for a checkbox or setting labeled “Related Products,” “Show Related Products,” or something similar.
4. Disable/Uncheck the Option: Uncheck the box or select the “Disable” option.
5. Publish Your Changes: Save your changes by clicking the “Publish” button at the top of the customizer.
Example:
Let’s say you’re using the popular Astra theme. You might find the related product setting under:
`Appearance > Customize > WooCommerce > Product Catalog > Related Products`
Simply uncheck “Enable Related Products” and publish.
Why this works:
Theme customizers provide user-friendly interfaces for modifying website settings, without requiring any coding knowledge. They tap into pre-built functionalities within the theme to easily toggle certain elements on or off.
Method 2: Code Snippet (For a Bit More Control)
If your theme doesn’t offer a built-in option, you can use a code snippet to remove related products. This involves adding a small piece of PHP code to your theme’s `functions.php` file or using a plugin designed for code snippets. Warning: Back up your site before making any code changes!
Here’s the code snippet:
How to Use it:
1. Access Your Theme’s `functions.php` File: This can be done in a couple of ways:
- Through the WordPress Theme Editor (Not recommended for beginners!): Appearance > Theme Editor. Locate the `functions.php` file on the right-hand side. Proceed with caution! One wrong move here and you can break your site.
- Using an FTP Client (More technical): Connect to your website’s server using an FTP client like FileZilla. Navigate to your theme folder (`wp-content/themes/[your-theme-name]/`) and locate the `functions.php` file.
- Using a Code Snippets Plugin (Recommended!): Install a plugin like “Code Snippets” (search for it in the WordPress plugin repository). This allows you to add and manage code snippets without directly editing your theme files.
2. Add the Code Snippet: Paste the code snippet at the *end* of the `functions.php` file (before the closing `?>` tag if it exists). If you’re using a Code Snippets plugin, create a new snippet and paste the code there.
3. Save Your Changes: Update the `functions.php` file or activate your Code Snippet.
4. Clear Your Cache: Clear your website’s cache (if you’re using a caching plugin) to ensure the changes are visible.
Why this works:
This code snippet uses a WordPress filter called `woocommerce_related_products_args`. Filters allow you to modify data before it’s displayed. In this case, we’re using the filter to tell WooCommerce to display an empty array ( `return array();` ), effectively preventing any related products from being displayed.
Important Considerations:
- Child Theme: Always use a child theme when making code changes. This prevents your changes from being overwritten when your parent theme is updated.
- Code Snippets Plugin: Using a plugin like “Code Snippets” is strongly recommended for beginners. It’s much safer than directly editing your theme files.
Method 3: Plugin Options (For the Best of Both Worlds)
If you’re not comfortable with code, but want more control than your theme’s customizer offers, a dedicated plugin is a great option. There are several WooCommerce plugins that allow you to manage or completely remove related products.
Example Plugin: WooCommerce Product Recommendations (Not specifically *for* removing, but offers very granular control).
While not solely for removing related products, this plugin allows you to:
- Completely Disable Related Products: It offers a setting to globally disable related products.
- Define Your Own Recommendations: Replace the default related products with hand-picked items, cross-sells, or upsells.
- Personalize Recommendations: Display different recommendations to different users based on their browsing history or purchase behavior.
How to Use it:
1. Install and Activate the Plugin: Search for “WooCommerce Product Recommendations” (or a similar plugin) in the WordPress plugin repository. Install and activate the plugin.
2. Configure the Plugin Settings: Navigate to the plugin’s settings page (usually under WooCommerce or a dedicated menu item).
3. Disable or Customize Related Products: Look for options to disable related products or define your own recommendations.
Why this works:
Plugins provide a pre-built interface and functionality, making complex tasks easier to manage without coding. They handle the underlying code and logic, presenting you with user-friendly settings and options.
Which Method is Right for You?
- Theme Customizer: Best if your theme has a built-in option. The easiest and fastest way.
- Code Snippet: Best if you’re comfortable with code and want a simple solution that doesn’t require a plugin. Remember to use a child theme and back up your site!
- Plugin: Best if you want more control and customization options, or if you’re not comfortable with code. Offers the most flexibility but requires installing and configuring a plugin.
No matter which method you choose, remember to test your changes thoroughly to ensure that your website is functioning as expected. Good luck!