› Forums › WordPress/WooCommerce › Disable and hide Related Products in WooCommerce
- This topic is empty.
-
AuthorPosts
-
June 17, 2025 at 9:22 am #4072
Zain
ParticipantHey, how can I turn off and hide the related products section in WooCommerce? I’m curious if I can do it for the whole site or just for certain products or categories. What’s the best way to go about it, like using code snippets, plugins, or tweaking my theme? Also, what should I keep in mind about how this might affect upselling?
June 17, 2025 at 11:39 am #4076Christopher
ParticipantIf you want to hide those related products in WooCommerce without messing with a plugin, you can either tweak your theme’s template files or throw in some custom CSS.
OR if you’re looking for a more permanent fix, you can just get rid of the related products section by adding a little code to your theme’s functions.php file or by unhooking the WooCommerce action that shows them.
Alternatively, you can hide them using CSS, though this only visually hides them, and the related products data is still loaded in the background.
Here’s a breakdown of the methods:
1. Theme Customizations:
- Locate the template:
Identify the template file in your theme that displays related products (usually woocommerce/single-product/related.php). - Remove or modify:
You can either remove the entire related products section from the template or modify the code to exclude certain products or categories.
2. Using Custom CSS:
- Access the customizer: Go to Appearance > Customize > Additional CSS in your WordPress dashboard.
- Add the CSS: Use the following CSS code to hide the related products section:.related.products {
display: none !important;
}
<span style=”text-decoration: underline;”>Important note: This method only hides the visual element. The related products data is still loaded in the background.</span>
3. Using Code Snippets:
- Add to functions.php: Add the following code snippet to your theme’s functions.php file (or preferably a child theme’s functions.php )remove_action( ‘woocommerce_after_single_product_summary’, ‘woocommerce_output_related_products’, 20 );
Instead of showing random related products, add a slick “Frequently Bought Together” section.
It’s like suggesting fries with a burger – customers love the combo, and it bumps up your average order value (AOV) effortlessly.
Pro Tips for Maximum Impact
- Keep It Relevant: Pair products that make sense together (e.g., coffee beans with a coffee maker).
- Offer Discounts: A small fixed or percentage discount can seal the deal.
- Use Shortcodes: Use [wps_bump_offer_shortcode] to place the feature anywhere on your site for extra flexibility.
- Track Performance: Use the plugin’s analytics to see which combos are clicking with customers.
- Locate the template:
-
AuthorPosts
- You must be logged in to reply to this topic.