How to Remove Related Products in WooCommerce

In WooCommerce, related products are a powerful tool for enhancing sales by suggesting complementary items on product pages. However, there are times when removing related products may align better with your business strategy. For example, to simplify the viewing experience or implement a more targeted upsell approach. This article will explore why and when to remove related products, the impact on sales and SEO, and detailed methods to customize this feature to fit your unique business needs.

FAQ

How to remove related products from the product page in WooCommerce?


Remove related products by adding a code snippet to your theme’s functions.php file that unhooks the related products function.

How do I edit WooCommerce related products?


Edit related products in WooCommerce by modifying the related products query through hooks in your theme’s functions.php file, such as adjusting the number of displayed products or changing their attributes.

How do I hide out of stock products from related products in WooCommerce?


Hide out of stock products from related products by using a custom query in the related products function in your theme’s functions.php file that excludes out of stock items.

How do I remove featured products from WooCommerce?


Remove featured products by editing the WooCommerce template or using custom CSS to hide the featured products section, or modify the query in your theme to exclude featured products.

Understanding related products in WooCommerce

In WooCommerce, related products are an essential feature designed to boost sales by showcasing items that complement the current product a customer is viewing. By understanding when and why to remove these suggestions, you can tailor your product pages to better suit your shop’s strategy.

There are three main ways products can be related:

Up-sells

  • Up-sells are recommended products instead of the current product.
  • Typically more profitable, higher quality, or more expensive.
  • Displayed on the single product page beneath the product’s description.
  • User-defined.

Cross-sells

  • Cross-sells are complementary products promoted in the cart.
  • Example: Laptop accessories for a laptop.
  • Displayed on the cart page beneath the cart products table.
  • User-defined.

Related products

  • Products sharing the same tags or categories as the current product.
  • Automatically displayed on the product page.
  • Cannot be specified in the admin but influenced by grouping similar products.

When and why to remove related products

WooCommerce automatically generates related products on your product pages based on similarities in tags and categories, offering customers additional items they may be interested in. While this feature can enhance user experience by supplying relevant upsells and cross-sells, there are specific scenarios where you might want to remove related products.

Simplifying product pages: If your product pages are cluttered, removing related product sections can help streamline the customer’s view and keep them focused on the main product.

Targeted upsell strategy: You might prefer to implement a more targeted upsell strategy, replacing WooCommerce’s automated related products with handpicked choices that you’ve determined are more appropriate or profitable.

Removing related products can provide a cleaner layout and can help direct your customers’ attention to the items you want to highlight, like certain upsells or cross-sells, without the distraction of automated suggestions.

How to remove related products in WooCommerce

In your WooCommerce store, there might be times when you want to tailor the customer experience by altering the default presentation of related products. You can achieve this by using different methods such as CSS, editing your theme’s functions.php file, or by unhooking actions in WooCommerce.

Using CSS to hide related products

You can quickly hide related products from your product pages with a few lines of CSS code.

  1. Navigate to Appearance > Customize in your WordPress dashboard.
  2. Go to Additional CSS and enter the following CSS code:

    .related.products { display: none;}
  3. Click on Publish to save your changes.Removing related products using additional CSS

      This approach does not remove related products from your website’s code; it only hides them from view.

      Editing functions.php to remove related products

      For a more permanent solution, you can remove related products by adding a code snippet to your theme’s functions.php file.

      1. Access your website’s files using an FTP client or file manager provided in your hosting control panel.
      2. Find your current theme’s folder and locate the functions.php file.Removing related products using the theme functions php file.
      3. Edit the file and insert the following code at the end of the file:
         remove_action('woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20);
      4. Save your updates and upload the file back to the server if you downloaded it.

      Adding this code effectively removes the related products section from all product pages on your WooCommerce site.

      Unhooking actions in WooCommerce

      Another method to disable the related products feature involves unhooking the WooCommerce action responsible for displaying related products.

      1. Access functions.php as described above.
      2. Add the following code snippet:
         add_action('template_redirect', 'remove_woocommerce_related_products');function remove_woocommerce_related_products() {if (is_product()) {remove_action('woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20);}}
      3. Save and re-upload the file if necessary.

        This code first checks if a single product page is being displayed before removing the related products, which ensures that the related products are only removed where needed.

        Child theme considerations

        A child theme ensures that your customizations are preserved during a parent theme update. When dealing with code snippets to remove related products, you should add them to your child theme’s functions.php file. A child theme reflects smart practice to keep changes separate from the parent theme, making updates worry-free.

        1. Initialize your child theme if you haven’t done so yet, ensuring it inherits styles and functions from the parent theme.
        2. Navigate to Appearance > Theme Editor in your WordPress dashboard.
        3. Select your child theme and find the functions.php file in the right-hand list.
        4. Insert your code snippet into the functions.php file and save the changes.Removing related products using the child themes functions php file

        By opting for a child theme, your custom code snippets remain protected even when the main theme receives an update, offering peace of mind and stability for your site’s appearance and functionality.

        Selecting the right tools for customization

        When customizing your WooCommerce store, the tools you choose can significantly streamline the process and ensure compatibility with your theme. Select savvy plugins and understand child theme nuances to tweak your store’s presentation with confidence.

        Plugins for disabling related products

        Plugins are your go-to solutions for adding functionality to your WooCommerce store with minimal effort. To remove related products, consider the NS Remove Related Products plugin, which provides a simple way to mitigate clutter on your product pages without delving into code.

        1. First, go to the Plugins section in your WordPress dashboard and click on Add New.
        2. In the Keyword search box, type NS Remove Related Products and hit Enter.
        3. Click Install Now by the plugin’s name and, once installed, hit the Activate button.

        By activating this plugin, you can visit the settings and toggle the removal of related products with ease.Removing related products using NS removal plugin

        Enhancing store performance post-removal

        After you’ve removed related products from your WooCommerce site, it’s crucial to focus on improving your store’s performance to potentially increase sales and enhance the customer experience. Optimizing your product pages and overall website design allows for a more streamlined shopping experience. Here’s how you can elevate your store’s performance:

        Boost your website speed: Fast loading times are essential for customer retention. Use tools to compress images and leverage browser caching for improved speed. This, in turn, can positively affect your SEO rankings as search engines favor quick-loading sites.

        Refine your product pages: Now that you have more space, emphasize the uniqueness of each product. Use high-quality images and detailed descriptions to entice purchases. Enhanced product pages can lead to better conversion rates.

        Strategize your design: A clean, uncluttered design improves user navigation. Rethink your store layout to ensure customers can find what they need without distractions, providing a smoother shopping experience.

        Personalize the customer experience: Implement customization options like personalized recommendations. Customers appreciate tailored suggestions based on their shopping history, which could increase sales and revenue.

        Adjust your SEO approach: Without related products, you may need to update your SEO strategy. Focus on keywords relevant to individual products and ensure your content matches what your customers are searching for.

        Analyze and adapt: Use analytics to track the impact of these changes. Continue tweaking your approach based on customer behavior to stay ahead of the algorithm and market trends.

        Analyzing the impact on sales and SEO

        When you consider removing related products from your WooCommerce store, it is important to evaluate how this could affect both your sales and search engine optimization (SEO).

        Sales: Related products are a powerful tactic to increase customer engagement and potentially boost your average order value by suggesting additional items to shoppers. These recommendations could lead to customers discovering products they didn’t initially consider, enhancing customer satisfaction and repeat purchases.

        To assess the impact on sales:

        • Track changes in your average order value before and after making adjustments in the WooCommerce dashboard.
        • Monitor the sales statistics for products that were frequently bought together to see if there is a notable decline after removal.

        SEO: From an SEO standpoint, related products can increase the content richness of your product pages, which is a positive signal to search engines. However, if the related products are not carefully curated, they might distract customers or lead to a higher bounce rate, indirectly affecting your SEO negatively.

        To analyze the SEO effects:

        • Observe the bounce rate and time on page metrics in your analytics tool to gauge user engagement post-removal.
        • Check your search rankings for key product-related terms to see if they shift after making changes in the WooCommerce settings.

        By keeping a close eye on these factors, you can make informed decisions about the configuration of your online store that best balance the needs for direct sales and organic search visibility.

        Advanced strategies for developers

        When diving into the code, developers can use various advanced methods to customize their WooCommerce stores. You’ll need to be comfortable with editing PHP files and understanding WordPress hooks if you want to tailor the related product feature to your needs.

        Modifying WooCommerce query filters

        By tapping into WooCommerce’s query filters, you can control which products are deemed related. Use the add_filter function in your functions.php file to adjust the criteria for related items. For example:

        1. Open your functions.php file within your child theme.
        2. Add a new add_filter statement to modify the ‘woocommerce_related_products’ hook.
        3. Define your custom function that will return a modified query, such as altering the tags or the category of products considered related.

        Here’s a snippet of PHP code that you could use as a starting point:

        add_filter( 'woocommerce_related_products', 'your_custom_related_products_filter');
        
        function your_custom_related_products_filter($related_posts, $product_id) {
        
         // Your custom query alterations go here
        
         return $related_posts;
        
        }

        Remember, the goal is to append or modify the criteria for how WooCommerce decides which products are related.

        Writing custom functions for specific themes

        For developers proficient with code, creating a plugin to manage these settings can be an effective solution, offering users the benefit of updates and support without direct code modifications. Whether you’re adjusting existing PHP code or crafting a tool for non-coders, consider user-friendliness and the provision of clear documentation.

        Conclusion

        You can strategically remove or customize the related products in WooCommerce to suit your unique business needs, whether to simplify product pages or implement a more targeted upsell strategy. This adjustment can potentially enhance user experience, focus customer attention, and ultimately, impact sales and SEO performance. Utilize CSS, edit the functions.php file, or employ plugins to make these changes efficiently.

        Analyzing the effects of these modifications on your store’s performance is crucial to ensure that your adjustments yield the desired results. Use this knowledge to refine your eCommerce strategy, enhance your website’s performance, and possibly increase customer satisfaction and sales.

        Looking to sell online?

        Simplify WooCommerce

        Share article

        Leave a comment

        Your email address will not be published. Required fields are marked *

        Your email address will never be published or shared. Required fields are marked *

        Comment*

        Name *