# How to Hide WooCommerce Categories: A Beginner’s Guide
So, you’ve got a bustling WooCommerce store, but some categories are causing clutter or just aren’t ready for prime time. Perhaps you’re using them for internal organization, for products awaiting approval, or for categories you plan to use in the future but aren’t quite ready to showcase publicly. Whatever the reason, hiding WooCommerce categories is easier than you think! This guide will walk you through several methods, from the simple to the more advanced, explaining each step clearly.
Why Hide WooCommerce Categories?
Before diving into the “how,” let’s understand the “why.” Hiding categories can be beneficial for several reasons:
- Organization: Keep your backend tidy by hiding categories that aren’t ready for customers to see. Think of it like keeping your messy workshop hidden from clients—they only see Read more about How To Set Up Free Shipping Coupon In Woocommerce the polished showroom.
- Staging and Testing: Hide categories while you’re populating them with products or testing new features. This avoids confusing customers with incomplete sections of your store.
- Inventory Management: Hide categories representing items temporarily out of stock or discontinued to avoid customer frustration.
- Internal Use: Some categories might be for internal use only (e.g., “wholesale,” “samples”). Hiding them prevents customers from accidentally accessing them.
- Step 1: Go to Appearance > Menus.
- Step 2: Uncheck the categories you want to hide from your navigation menus.
- Step 3: Save Menu.
- Navigate to WooCommerce > Products > Categories.
- Locate the categories you want to hide. You can’t directly hide them, but we can make them effectively invisible by removing them from the Shop page display. This involves either deleting the category entirely (if you Learn more about How To Install Google Analytics In Woocommerce absolutely don’t want it anymore) or simply not displaying it on the main shop page.
Method 1: The Easy Way – Using WooCommerce’s Built-in Features
This method utilizes WooCommerce’s default settings and is the simplest for most users. It involves removing categories from menus and shop pages.
This method hides the categories from your main navigation, but the products within those categories will *still* be accessible via direct links (if the products have their own URLs). If you need a more complete hiding solution, continue reading.
Method 2: Removing Categories from the Shop Page
This method prevents the hidden categories from appearing in your WooCommerce shop page’s category listing. However, as with method 1, individual product pages will remain accessible.
This does NOT remove the products; only the category’s display on the shop page is changed.
Method 3: The Advanced Approach – Using Custom Code (for complete hiding)
For complete control, and to entirely remove a category from view (including product pages linked through it), we need to use custom code. Caution: Incorrectly using code can damage your website. Back up your site before attempting this.
This method involves using a plugin or adding a code snippet to your `functions.php` file (or a child theme’s `functions.php` file – highly recommended to avoid losing changes on theme updates).
Here’s an example using a code snippet to remove a category with the slug “hidden-category”:
function remove_category_from_shop( $query ) { if ( is_shop() ) { $query->set( 'category__not_in', array( get_term_by( 'slug', 'hidden-category', 'product_cat' )->term_id ) ); } return $query; } add_action( 'pre_get_posts', 'remove_category_from_shop' );
Remember to replace `’hidden-category’` with the actual slug of the category you want to hide. You can find the category slug in the category edit page in your WordPress admin. This code prevents the “hidden-category” from appearing anywhere on your shop pages. To remove multiple categories, add their term IDs to the `array()`.
Method 4: Using a Plugin
Several plugins provide more user-friendly ways to hide or manage categories. Search for plugins like “WooCommerce Category Manager” or similar. These plugins offer a visual interface, making hiding categories easier than manual code editing. Explore this article on How To Change Woocommerce Checkout Page Always check reviews and choose reputable plugins.
Conclusion
Hiding WooCommerce categories offers flexibility for managing your online store’s appearance and organization. Choose the method that best suits your technical skills and needs. Remember to always back up your website before making code changes. If you’re unsure, starting with the simpler methods (Menus and Shop Page adjustments) is recommended before moving onto more advanced techniques.