by admin
January 5, 2022

How to remove related products in Woocommerce for your store

Engaging clients to add additional things to their shopping basket is constantly encouraged in ecommerce. That is the reason why WooCommerce by default displays related products on the product detail page. As a result, it allows you to up-sell and cross-sell to your customers. Thanks to it, clients can look at different products in your store and adjust their order sizes appropriately. However, these related products do not always perform as users would like. Hence, removing it is a must in many cases. With this reason, in this post, Arrowtheme will instruct you how to remove related products in Woocommerce for your ecommerce store successfully. Read our article right now! 

how to remove related products in woocommerce

How to remove related products in woocommerce?

You are able to remove related products in WooCommerce through one of two ways: by adding some code to your theme’s functions.php file or by setting up a free plugin. Let’s begin with the first approach.

How to remove related products in Woocommerce by editing the theme’s functions.php file?

In order to switch off WooCommerce-related products manually, you should follow these two steps: 

#1. Generate a child theme

Your custom code can be deleted when the parent theme is updated. Hence, it is extremely important to build a child theme and make modifications there. Besides, you are able to create a new folder with a new name in your theme directory. 

#2. Add a few lines of code to the functions.php file of your child theme

Then, at the bottom of the file, or just before the?> ending tag, you need to add the following code to your theme’s fuctions.php file: 

/**

* Remove related products output

*/

remove_action( ‘woocommerce_after_single_product_summary’, ‘woocommerce_output_related_products’, 20 );

In particular, editing the functions.php file is a developer-level method that necessitates coding and theme expertise. Therefore, if you are without technology knowledge, you should consider utilizing a plugin to make the linked product removal procedure easier. 

How to remove related products in Woocommerce by using NS Remove Related Products for WooCommerce plugin?

Coming to another method to remove Woocommerce related products you need to know is to take advantage of NS Remove Related Products for WooCommerce plugin. All you have to do is install, activate, and enable the plugin, then leave it to do its thing. 

#1. To begin, in your WordPress dashboard menu, you have to go to the Add New under Plugins section. 

How to remove related products in Woocommerce by using NS Remove Related Products for WooCommerce plugin

#2. In the Keyword field, you have to type NS Remove Related Products for WooCommerce

NS Remove Related products

#3. Then, you must click Install and Activate buttons

install and activate buttons

#4. After that, you must remove Related from the sidebar by clicking the Remove Related icon.

#5. Then, you must make sure the Enabled Plugin is checked, then save your modifications.

remove related products in Woocommerce by using NS Remove Related Products for WooCommerce plugin

What’s more, the free version only allows you to conceal related WooCommerce products. Therefore, you will need to upgrade to the Pro version to unlock the full set of features. 

conceal related WooCommerce products

Not only for the general public, but also for registered users, you can easily show or hide related products. Besides, the “Number of related goods” option can also be used to change the number of products displayed. In addition, you can also sort products by product IDs, insertion date, changed date, or title instead of presenting them randomly. Alternatively, WooCommerce products can also be ordered by ASC (from top to bottom) or DESC (from bottom to top). In particular, if you don’t want related goods to be shielded on all product pages, but only on a few, let’s go to the individual pages and make the modifications there.

What if you want to protect WooCommerce products?

In many cases, you may wish to do more than merely hide related products at times. Some items require security to ensure that only authorized or premium users can access and purchase them. You might, for instance, sell alcohol or other adult items or services. Hence, underage customers are prevented from accessing these types of products if they are password protected. In this situation, a password protection plugin is used. Following that, your WooCommerce store’s products will not be visible to the public. Plus, the private products can only be viewed by those who have the necessary passwords. 

Password Protect WordPress Pro plugin turns out to be one of the most effective options among the several password protection plugins available. This flawless plugin enables you to password-protect WooCommerce products. Best of all, with a few simple clicks, you are able to secure product pages. 

Way to password protect WooCommerce products with Password Protect WordPress Pro plugin

This plugin is integrated straight to your WordPress dashboard navigation menu after installation. Let’s follow the step by step guide below to begin password-protecting WooCommerce products:

#1. To begin, in order to visit the Settings page, you must click Password Protect WordPress.

#2. Then, in the Post Type Protection section, you have to choose the Products option.

Way to password protect WooCommerce products

#3. After that, don’t forget to save your changes.

#4. To continue, you need to go to WooCommerce >> All Products under Products section and then, select your desired product page.

#5. In the next stage, you have to hover the product name and click the Edit option. 

#6. Finally, on the top right side of the editing screen, you must toggle the option Password protected. 

password protect WooCommerce products

What’s more, a password has been issued to your product page. However, it won’t appear in your WooCommerce store or on any search results pages. You just need to turn off the option Block Search Indexing if you want users to be able to see the private product on Google and other search engines.

block search indexing

Through the Password Protect WordPress Pro plugin, you can do a lot more with the protected page. For more details, you can enable cookie expiration to allow users to access protected items after a certain amount of time without having to re-enter their credentials. Moreover, the default time frame is seven days. 

password protect child pages

Additionally, whitelisted roles, such as Admins, Page Authors, or Login Users, can see secure products without requiring a password. Besides, when you want all types of users to fill out the password box, you just need to leave No one. Furthermore, once the parent product page is protected, all child product pages are automatically locked. In particular, the same may be said for product categories and their subcategories. 

Wrapping up

To conclude that, removing related goods on WooCommerce single product pages is an excellent way to improve your WooCommerce store’s performance. There are a variety of technical and non-technical approaches you can take advantage of to do this. In fact, adding code necessitates editing the functions.php file in the theme. Meanwhile, the NS Remove Related Products for WooCommerce plugin, with its comprehensive capabilities and user-friendly interface, is quite good when it comes to deleting related products. All in all, Arrowtheme believes this article brings you as much useful information as you wish.

In addition, you can refer to our Woocommerce Website packages for getting more helpful Woocommerce solutions. In case you want to open a Woocommerce store yet you don’t know how to code in order to create a website, our packages are all you need. Our services, with three available packages ranging from Basic to Standard to Advance, will never disappoint you. Additionally, we provide a discount program that saves you up to 30% on all of our WordPress services. Hence, please CONTACT US if you are interested.

Related Posts