PeachPay

Supercharging WooCommerce Checkout & Payments

SPONSORED

How to Remove Related Products on a WooCommerce Product Page

On a single product page, WooCommerce shows related products by default. Here's the code snippet you need to put in your theme's functions.php in order to disable this feature.
Table of Contents

logo woocommerce

On a single product page, WooCommerce shows related products by default. Here’s the code snippet you need to put in your theme’s functions.php in order to disable this feature:

/* Remove WooCommerce Related Products */
add_filter('woocommerce_product_related_posts_query', '__return_empty_array', 100);

If you’re using a theme designed specifically for WooCommerce, you might be able to remove the related posts without any code by using the theme customizer.

Jean Galea
Jean Galea
Jean Galea is an investor, entrepreneur, and blogger. He is the founder of WP Mayor, the plugins WP RSS Aggregator and Spotlight, as well as the Mastermind.fm podcast. His personal blog can be found at jeangalea.com.

Consider sharing this post so others can find it:

Stay in the know on the latest and greatest products and services in WordPress. We'll send you one email every week with new and trending tutorials and reviews.

4 Responses

Leave a Reply

Your email address will not be published.

Haven't found an answer to your question? Ask us about it.
Although we publish new posts every week, we might not be answering your questions. Recommend a topic and we'll do our best to cover it in one of our next posts.
From hosting plans to WooCommerce plugins and backup services, we have put together a collection of exclusive coupons and deals!
WP Mayor_Icon_white
WP Mayor Team

Get the latest reviews & tutorials, just like this one, curated in your inbox.