Having numerous products can make your WooCommerce shop page look promising. But it would look messy if not optimized. It’s also possible that your high-performing products fail to attract attention and generate enough sales.
You cannot let that happen and risk your hard work.
So, one solution is to hide WooCommerce categories that are unnecessary, seasonal, or not generating sales. You can also hide categories from specific user roles to better control what different users see.
This makes it easier for customers to navigate your store, keeps your shop page organized, and can improve conversions.
In this blog, we’ll show you how to hide categories in WooCommerce using built-in settings and code snippets for different scenarios. We’ll also look at a reliable solution to bulk edit and manage product categories more efficiently.
Why hide categories in WooCommerce?
We’ll share a few significant reasons to hide categories in WooCommerce:
- Convey effective brand voice: You can display intended products and services to your audience and promote them to convey brand voice more creatively.
- Streamline shopping process: It can help visitors search for the desired product quickly and buy whatever they want.
- Declutter unnecessary products: It lets customers focus on the important ones. It also brings out brands’ aesthetics and helps marketing high-yielding products better.
- Enhanced customer experience: Your customers will stay long to browse your site longer and provide positive feedback. It eventually encourages them to revisit.
Overall, hiding categories can help in target marketing and boost sales in the long run.
It can also help you hide seasonal, private, wholesale, or uncategorized products from customers without deleting them.
Further, WooCommerce categories can help you organize your products. So that users can easily find what they’re looking for.
Note that not all categories need to be shown to the users, such as the ‘Uncategorized’ category in WooCommerce.
And, if you want to prevent certain products from being displayed in your shop, you can:
- Create a member-only store that allows only special and logged-in users to purchase the products.
- Sell products to specific users only, allowing them to access only after using a specific password.
- Create private products and send access to some of your customers via email.
WooCommerce hide category – doing it the default way and coding
You can use your default WooCommerce settings to hide categories in WooCommerce. In some cases, you’ll need some code snippets. Let’s look at the various scenarios:
Your visitors won’t be able to see that category or products that belong to it.
Hide all categories on the shop page
- Go to WordPress Admin panel > Appearance > Customize > WooCommerce > Product Catalog.
- Under the Shop page display, choose
Show productsand clickPublish.

This will display products on the shop page while hiding product categories from customers.
Hide categories in product widgets
If you want to hide your current category from the product categories widget, use the following code in your functions.php file.
But adding code is always risky. Refer to our doc on safely adding code snippets before you move ahead.
add_filter( 'woocommerce_product_categories_widget_args', 'storeapps_hide_current_cat_prod_cat_widget' );
function storeapps_hide_current_cat_prod_cat_widget( $args = array() ) {
if ( is_product_category() ) {
$current_cat_id = get_queried_object_id();
$args['exclude'] = $current_cat_id;
}
return $args;
}
Hide categories from users
This is if you want to allow access for some categories only to specific users. The below code restricts user roles, such as ‘Subscriber’ and ‘Shop Manager’, from accessing the fashion category.
add_filter( 'woocommerce_product_query_tax_query', 'storeapps_hide_shop_categories_by_role' );
function storeapps_hide_shop_categories_by_role( $tax_query = array() ) {
$user = wp_get_current_user(); // Get the current user object.
$blocked_user_roles = array( 'subscriber', 'shopmanager' ); // Define an array of blocked user roles.
$hidden_categories = array( 'fashion' ); // Define an array of hidden categories.
if ( is_user_logged_in() && count( array_intersect( $blocked_user_roles, $user->roles ) ) === 0 ) {
return $tax_query;
}
$tax_query[] = array(
'taxonomy' => 'product_cat',
'terms' => $hidden_categories,
'field' => 'slug',
'operator' => 'NOT IN',
);
return $tax_query; // Return the modified tax query.
}
Hide products from a WooCommerce product category
This is to remove products from categories instead of removing categories in the first place.
add_action( 'woocommerce_product_query', 'storeapps_exclude_categories_from_shop_page' );
function storeapps_exclude_categories_from_shop_page( $q ) {
$tax_query = (array) $q->get( 'tax_query' );
$tax_query[] = array(
'taxonomy' => 'product_cat',
'field' => 'slug',
'terms' => array( 'uncategorized', 'books' ), // Exclude products in the "uncategorized" and "books" categories.
'operator' => 'NOT IN'
);
$q->set( 'tax_query', $tax_query );
}
That’s how you can hide categories on your WooCommerce store.
These methods work well for hiding categories. However, managing multiple categories in WooCommerce can become time-consuming as your store grows. You need a plugin that can do everything in just a few clicks.
So, the Smart Manager plugin can help you effectively manage categories on your WooCommerce store.
Let’s discuss it now.
How does Smart Manager help you better manage categories?
Smart Manager helps you manage multiple product categories, along with your entire store from one place. You can easily manage everything in seconds as it displays data in an Excel-like spreadsheet.

Key features:
- Copy categories from any record or other categories using the Bulk edit feature.
- Delete/duplicate all/selected products based on categories.
- Bulk assign/remove categories to products.
- Inline edit based on categories using the search filters.
- Export data based on categories.
- Advanced search filter to display product categories and bulk edit them.
- Advanced search filter to display blog posts and coupons based on categories.
- Edit/duplicate/delete selected blog posts and coupon categories.

and much more…
Conclusion
Hiding categories can be useful to make your shop page easier to use and manage. It also helps create a better customer experience, convey brand voice and navigate them smoothly.
Would you like us to add more code for different scenarios and plugins to hide categories? Reply in the box below.
FAQ
Can users still access hidden WooCommerce categories?
Yes. Hiding a category only removes it from certain areas of your store. Users may still access the category through a direct URL unless additional restrictions are applied.
Can you hide out-of-stock products in WooCommerce?
Yes. It’s simple. You need to go to WooCommerce > Settings > Products > Inventory. Scroll down and check the box ‘Out of stock visibility’ box. That will hide your out-of-stock items from your catalog.
Does hiding categories affect SEO?
Hiding categories would not directly affect SEO. Though they aren’t visible, you still have those categories on your shop page. Customers will be able to find them when they search it. The point is hiding categories can provide a better user experience, resulting in better SEO ranking.
Is it good to hide categories for A/B testing?
Though you shouldn’t do it frequently, it’s advisable to analyze the impact on sales and user behavior by hiding a few product categories.
About the Author – Akshat Kothari
Engineer by training, marketer by instinct. Akshat is an integral part of the marketing team at StoreApps, where he takes complex WooCommerce concepts and turns them into strategies store owners can put to work immediately. When he steps away from the screen, he’s either exploring a new city or binge watching movies.
