How to Remove Related Products From Product Page In WooCommerce

How to Remove Related Products From Product Page In WooCommerce
484 Views
0
(0)

Woocommerce offers a lot of features and flexibility to create an online store, including the ability to display related products on the product page. However, in some cases, you may want to remove this feature. In this article, we’ll show you how to remove related products from the product page in WooCommerce.

Follow these steps to Remove Related Products From the Product Page In WooCommerce.

Step 1: Log in to your WordPress dashboard

The first step is to log in to your WordPress dashboard, which is the backend of your website. Once you’re logged in, navigate to the “Appearance” menu on the left-hand side.

Step 2: open “Theme Editor”

After you’ve clicked on the “Appearance” menu, click on “Theme Editor” to access the theme editor. This will open a new window with a list of files on the right-hand side.

Step 3: Select “functions.php”

In the list of files, find “functions.php” and click on it to open it in the editor.

Step 4: Add the code to remove related products

<?php
/**
 * Cxc Remove Related Product
 */
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20 );
?>

You may also use CSS in the “Additional CSS” section of your customizers to conceal the related product’s output.

body.single-product section.related.products {
	display: none !important;
}

By following the steps outlined in this article, you can easily remove related products and customize your product page to meet your needs.

Also Read:

FAQs

Will removing related products affect my online store’s functionality?

No, removing related products from the product page will not affect the functionality of your online store.

Can I remove related products for specific products only?

Yes, you can remove related products for specific products only by using a conditional statement in the code snippet.

How useful was this blog?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this blog.

By Subhash Katakiya

Hey Guys, My Self Subhash Katakiya. I am a resident of Gujarat. I have 2+ years of experience in full-stack web development. Currently, I am working in CodexCoach Company. In particular, I specialize in WooCommerce, plugins, and themes. So, read my blogs and learn full-stack web development skills with my guide.

Leave a comment

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