You don’t need to showcase every product category on your online venture. Sometimes, it’s better to hide product categories that are less important for your eCommerce store. This helps you to bring high-converting products to the limelight and improve overall sales, revenue, and shopping experience.
For example, hiding discontinued and stockout goods will keep the navigational process smooth and fast. Hence, it’s necessary to learn how to hide product categories in WooCommerce.
And in this blog, we’ll walk you through all the possible ways of hiding categories in WooCommerce. So, let’s dive in…
Quick Overview
This tutorial will let you know the importance of hiding poduct category on WooCommerce. Also, you will learn ways of hiding product categories.
Tools Used: WooCommerce, Elementor & ShopEngine.
Here we’ll include three methods of hiding WooCommerce product category:
- Hide from default WooCommerce single product page.
- WordPress plugin.
- Coding.
Why is hiding the product category necessary for your eCommerce site?
Hiding product categories that are less important often allows you to highlight popular or in-demand products. Additionally, it helps you to keep your site’s navigation clean and smooth.
Not only these, hiding product category brings many more benefits such as:
- Sometimes hiding product categories helps browsers notice core products.
- This allows you to keep your discontinued items hidden.
- It assists you in improving your customers’ shopping experience by offering simple navigation.
- Conversions, bounce rate, and other key marketing metrics will improve by eliminating unnecessary categories.
- It helps you to display store highlights that are more essential to the market.
- This speeds up your visitors’ purchasing decisions by reducing the number of options.
- It helps you to do A/B testing to find the best result.
Ways to hide product category in WooCommerce (3 methods)
There are different ways to hide product categories in WooCommerce. The main methods for hiding WooCommerce product categories are using default settings, plugin, and coding. Here we’ll showcase all these methods that will guide you how to hide product category in WooCommerce:
Hide product category from the WooCommerce default single product page
The first way is to hide WooCommerce product categories from the default single product page. You need to edit the single product page template to hide the category from the default page. For that, navigate to Appearance >> Editor.

After that, Click Templates >> All templates I hit the “Single Product” template on the right side. This will redirect you to the single product page template.

Teraz, press the “Product Categories” I hit the “Documents overview” on the top left side to visit List View. Then, click the three dots icon and press the “Delete” option. Thus, your product categories will be deleted from the single product page template.

How to hide product category in WooCommerce using a plugin
You can also hide product categories using a plugin. For example, a Kreator stron WooCommerce like ShopEngine has a built-in option to hide product categories from different pages, such as the shop page and the single product page.
So, if your WooCommerce pages are built with ShopEngine, then you can easily hide WooCommerce categories with its given option. Here is the complete guide on how to hide product categories in WooCommerce from different pages:
Hide product category from the WooCommerce shop page
First, to hide the product category from the shop page, navigate ShopEngine >> Szablony konstruktorów I kliknij „Edytuj za pomocą Elementora” option of that page.

This will redirect you to the Elementor editor, from where you need to click “Advanced Search” or the category field. After pressing this field, hide both “Show category on search result?” I “Show category dropdown” options. After selecting the hide option, naciśnij „Opublikuj” button to live this update. This will make your product category hidden on the shop page.

Hide product category from WooCommerce single product page
Similarly, you can hide the WooCommerce category from the single product page. For that, visit ShopEngine >> Szablony konstruktorów I naciśnij „Edytuj za pomocą Elementora” option for that single product page.

Następnie select the product from the dropdown menu and naciśnij „Edytuj za pomocą Elementora” button. It will take you to the single product page.

After redirecting to the single product page, click the “Edit Categories” opcja i press the “Delete” option. This will instantly remove the WooCommerce category from your product page.

Next to deleting the WooCommerce category, naciśnij „Opublikuj” button to make your edited WooCommerce product page live.


Hide WooCommerce product category with codes
Except plugin and default settings, hiding WooCommerce product categories is possible with custom CSS codes. You can simply add custom code to the function.php file of the theme file editor. In this case, you have to remember that if you’re adding custom codes to the main theme, then your custom codes will be removed whenever you update your theme. Hence, you have to add custom codes each time you update your theme.
So, the safest option is adding custom codes to the child theme. For that, navigate to Appearance>> Theme File Editor I press the functions.php file. After that, add the following custom codes at the end of your functions.php file. Finally, press the “Update File” przycisk, aby ożywić.

Here is the custom code that you need to add to the functions.php file:
add_action( 'pre_get_posts', 'hide_specific_categories' );
function hide_specific_categories( $query ) {
if ( ! is_admin() && $query->is_main_query() && ( is_shop() || is_product_category() || is_search() ) ) {
$query->set( 'tax_query', array(
array(
'taxonomy' => 'product_cat',
'field' => 'slug',
'terms' => array( 'category-slug-1', 'category-slug-2' ), // Replace with your category slugs
'operator' => 'NOT IN'
)
));
}
}
⭐️ Checkout this blog to display product category in WooCommerce.
Często zadawane pytania
Which one is the best method to hide WooCommerce product category?
Except coding, plugin and default options are suitable to hide WooCommerce product category as it’s easy to understand for all. However, if you have coding expertise then, coding can also be considered a great solution.
Can you hide multiple categories at once?
Yes, you can hide multiple categories at once using WordPress plugin or coding. whether you want to hide multiple categories from shop page or single product page, everything is possible with plugin.
Podsumowanie
Your WooCommerce store’s user experience is connected to easy navigation and hiding irrelevant or unnecessary product categories. The more you can provide fine navigation, the more you will be able to offer a better user experience.
Since you have already learned how to hide categories in WooCommerce, let’s start making your online store’s navigation simple by adopting one of these methods. And ensure your visitors never get frustrated due to a confusing navigational interface.
Dodaj komentarz