Turn off Related Products in WooCommerce Product Pages

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.

WordPress Code Warning:
This article features code changes, or snippets, that you can make in your active themes function.php file. If you are unfamiliar with this task, or want to brush up, we have an article on Managing code snippets in WooCommerce. The technique provided can be used for both WordPress and WooCommerce sites.

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!

Be Sociable, Share!

Author Bio

About the Author: Dan Pock

Dan Pock does Technical Writing & Marketing at Liquid Web with a background in System Administration, Public Relations, and Customer Service.

His favorite things include: his cats, Oscar Boots and Dash Nouget; experimenting with PHP; and making up recipes (or at least attempting to). You can find his coding hijinks on GitHub, where he shares most of his projects and open source work.

Here's 75 % off, Launch a New VPS Today. Find out why 30,000 customers have chosen our Best-in-Class Performance & 24x7 Heroic Support