Hide WooCommerce category

How to hide a WooCommerce category from the shop page

If you want to sell different products to different types of users, you’ll need a way to hide WooCommerce categories from the shop page. This allows you to sell to different types of customers from the same ecommerce website.

Hiding WooCommerce categories from the main shop page means that your regular customers won’t be able to access the products you want to sell to, say, members, staff, or wholesale customers only.

In this article, we’ll walk you through a quick, step-by-step tutorial to help you hide a WooCommerce category from the shop page.

Why you might want to hide WooCommerce categories

Hiding WooCommerce categories lets you:

  • Show different products to different users.
  • Offer different prices to different users.
  • Encourage customers to create an account, turning them into loyal members or subscribers.

Hiding one or more WooCommerce categories enables you to restrict access to multiple products in one go. So, let’s say you want to set up staff-only product pages on your website for selling staff apparel or specialist equipment, you can simply allocate these products to a category and hide the entire product category.

The easiest way to hide a WooCommerce category from the shop page is by using the WooCommerce Members Only plugin.

Check out our tutorial on how to hide individual products on your WooCommerce store if you only have a select few products that you’d like to restrict access to.

WooCommerce Members Only

Create a membership site by restricting access to your content and selling members only products

Find Out More

Let’s step through a couple of scenarios to give you a better idea of why you might need to hide WooCommerce categories.

Reason #1: to incentivize customers

You can choose to hide specific products from the public but still let specific user roles buy them. This way, you can create a sense of exclusivity for specific types of users such as members. So, if regular customers want to buy the hidden products, they’ll have to become members first.

Reason #2: to offer discounted prices to members or staff

If you run a membership site, you already know why it’s important to offer discounted prices for growing your customer base and boosting sales. Implementing differential pricing on your ecommerce site also helps you give your site members a more favorable price which encourages non-members to subscribe to your website.

Similarly, many online shopping stores offer staff discounts and purchase programs that let staff members buy products at discounted prices.

Reason #3: to sell products on your retail store and wholesale store

If you sell to both retail and wholesale customers on a single ecommerce website, you have to make clear distinctions between the products and prices available for each type of customer. For instance, you might offer significant discounts to wholesale buyers because they buy products in bulk.

You can do this by hiding wholesale-only product categories from retail buyers. This way, retail customers won’t be able to see items that are available only at bulk prices.

Related Tutorial
Here’s a detailed tutorial on creating a wholesale store in WooCommerce

How to hide a WooCommerce category (in 3 different ways)

Here, we’ll show you how to hide a WooCommerce category from the shop page. For this tutorial, you’ll need the WooCommerce Members Only plugin and some products or categories that you’d like to hide from the shop page.

WooCommerce Members Only is a robust and easy to use plugin that lets you hide WooCommerce categories in different ways. This way, you can make products available to specific users only.

There are three different ways to hide WooCommerce categories:

  • User role. Hide WooCommerce categories from certain user roles while allowing others to access them
  • Log in status. Show protected categories to logged-in users only.
  • Password. Add a password form so only people with the correct password can access the hidden categories.

How to hide a WooCommerce category from different user roles

Hiding a WooCommerce category from different user roles is perfect for when you have defined user roles that you’d like to hide a WooCommerce category from.

For example, if you run a membership site, you might want to sell certain products to all visitors or customers have have some specific products that you’d like to sell to members only. This could be merchandise or products that are related to membership content.

You can also use this method to hide product categories to sell to both retail and wholesale customers through the same ecommerce site. This way, you can show relevant products (and prices) to each customer type.

Following the same principle, you can create staff-only product categories where you offer specific types of products or discounts to staff members only.

The WooCommerce Members Only plugin lets you create user roles if you don’t already have user roles created. To do this, head over to WooCommerce > Settings > Members Only > User Roles from the admin panel.

Here’s how you can hide WooCommerce categories by user roles:

Hide WooCommerce category user role
  • Navigate to WooCommerce > Settings > Members Only
  • Choose ‘User Role’ in ‘Restriction Method’
  • Choose ‘Specified Categories’ in ‘Restricted Content’
  • Enter the product categories you’d like to hide in ‘Restricted Categories’
  • In the ‘Permitted User Roles’ field, enter one or more user roles that can view hidden categories.

By configuring these settings, hidden categories will no longer appear in any category archive and the products within these categories won’t be shown to regular visitors. In addition to this, customers won’t be able to directly access these products either.

How to hide a WooCommerce category from users who aren’t logged in

Hiding a WooCommerce category is also helpful if you’re looking to restrict access by logged-in status. This can be useful if you require certain types of customers to create a user account on your online store.

For example, you might encourage customers to sign up for an account to gain access to exclusive products and deals. This also works for online stores that want to sell certain products to wholesale buyers or members only.

Here’s how you can hide a WooCommerce category from users who aren’t logged in:

Hide category from logged in users
  • Navigate to WooCommerce > Settings > Members Only
  • Choose ‘Log In Status’ in ‘Restriction Method’
  • Choose ‘Specified Categories’ in ‘Restricted Content’
  • Enter the product categories you’d like to hide in ‘Restricted Categories’

You can also use the Members Only plugin to redirect users to a specific page (for example, a registration page) if they are not logged in. All you have to do is set the ‘If Restricted, Redirect To’ option to the page you want to redirect users to.

How to hide a WooCommerce category using a password

You can hide an entire WooCommerce category by setting up a password. This is perfect for when you want to hide certain products and categories from the main shop page but don’t have specific user roles you’d like to grant access to.

For example, if you’re a wedding photographer, you’ll be able to password-protect online galleries. This way, only people with the correct password will be able to view their most intimate moments and choose which photographs they’d like to add to the album they’ll purchase.

Password protecting WooCommerce categories enables you to create one or more passwords that can be distributed to different users. This way, only users with the correct password will be able to access a protected WooCommerce category.

Here’s how you can hide a WooCommerce category using a password:

Hide categories using passwords
  • Navigate to WooCommerce > Settings > Members Only
  • Choose ‘Password’ in ‘Restriction Method’
  • Choose ‘Specified Categories’ in ‘Restricted Content’
  • Enter the product categories you’d like to hide in ‘Restricted Categories’
  • In the ‘Permitted User Roles’ field, enter one or more user roles that can view hidden categories.
  • Enter a password (or multiple passwords) in ‘Passwords’
  • Choose the page your password form is added to using ‘Password Form Page’

Conclusion

Hiding your WooCommerce categories gives you more control over the shopping experience of different types of customers.

The WooCommerce Members Only plugin lets you sell different products to different types of customers based on their user role or logged in status. It also gives you the option to show WooCommerce categories to people only after they enter the correct password.

Ready to hide a WooCommerce category from the shop page? Get the WooCommerce Members Only plugin today!

WooCommerce Members Only

Create a membership site by restricting access to your content and selling members only products

Find Out More

Leave a Reply

Your email address will not be published. All fields are required.