There are many reasons to not include related products on your store. Regardless of those reasons, there’s a couple options for you if you’re looking to remove, or stop, the related products from showing on your store.
How do I stop related products from showing in the store?
Option 1: Using your theme
If you are using a pre-built theme, chances are that they have an option for to control this section. It’s likely something you may find under the single product page options. If you’re theme has this customization option built in then you can remove the related products without using any code.
So be sure to check your theme settings or options to see if this is something you can just enable or disable there! If you’re unsure where to look check for your themes options page, if it provides one, or the WordPress theme cutomizer.
Option 2: Using some code
If you are using a custom built theme, or a theme that doesn’t have an option to remove the related products from the single product page – you’re not out of luck. You can add the following code snippet to your theme’s functions.php file. Take note, we provide two methods to accomplish this task – you should try the top method first and attempt the alternative method if that one does not work.
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20 );
add_filter('woocommerce_product_related_posts_query', '__return_empty_array', 100);
This single line of code should be enough to disable the related products from showing up. In fact, this line actually simply removes the related products ‘action‘ from being run on the page all together. If for some reason this does not work for you and the theme you’re using you can try the second (alternative) method provided!
Give us a call at 800.580.4985, or open a chat or ticket with us to speak with one of our knowledgeable Solutions or Experienced Hosting advisors to learn how you can take advantage of these techniques today!