BUILDING A WHOLESALE STORE?

Check out our new plugin, WooCommerce Wholesale Pro - designed specifically for wholesale.
View Plugin

How to hide a WooCommerce category from the shop page

August 10, 2020 16 comments

Need to hide a WooCommerce category from the shop page? Sometimes you might have products that you don’t want to publicly list on your shop page. To your dismay, though, WooCommerce doesn’t have an option to hide categories from the shop page.

To help, we’re going to show you how you can hide one or more categories from your WooCommerce shop page via a user-friendly plugin.

Our simple written instructions and video will show you how to customize how your hidden WooCommerce categories function – all without writing a single line of code.

WooCommerce school category visibility

The best plugin to hide a WooCommerce category from the shop page

The problem

There are lots of reasons why you might want to hide WooCommerce categories from the main shop page. For example, maybe you’re creating a WooCommerce wholesale store and need to hide the wholesale categories from the shop page. Maybe you’re selling customer-specific products, with a hidden category for each company.

Whatever you’re reason, unfortunately WooCommerce doesn’t come with an option to do this.

While it is possible to use a PHP function to hide a WooCommerce category from the shop page, that solution:

  • Isn’t very user-friendly because it requires you to work directly with PHP code, rather than a human-friendly interface.
  • Makes it difficult to change which categories are hidden later on, because you’ll need to dive back into the code every time you want to make an adjustment.

The solution

WooCommerce Protected Categories offers a simpler solution to hide a WooCommerce category (including all products/subcategories inside). It:

  • Gives you more flexibility than the WooCommerce PHP function in terms of how shoppers interact with your hidden categories.
  • Lets you choose which categories to hide right from your WordPress dashboard.
  • Lets you decide whether to hide categories from the shop page completely, or whether to show them but require customers to enter a password or login to access a protected category or its products.

WooCommerce Protected Categories
Start hiding WooCommerce categories from the shop page today.

The plugin lets you hide unlimited categories from your WooCommerce shop page. To let people unlock a hidden category, you can choose between:

  • Requiring users to enter a password before they can see the hidden category (or categories).
  • Only allowing logged in users with specific roles to see the hidden categories.
  • Only allowing specific individual users to see the hidden categories.

The plugin also offers more advanced functionality, like whether or not to still list your hidden categories in navigation menus or sidebars.

Have a read through this glowing review from a happy customer using the WooCommerce Protected Categories plugin:

Excellent plugin!
By Timothy
I highly recommend Barn2's 'WooCommerce Password Protected Categories' plugin for a whole range of uses. For our particular use, we needed to allow only certain categories of our products to be accessed by 'select' customers, with a shared password. The plugin enabled us to do this really simply and cost-effectively. Whenever we have needed any assistance with the plugin Barn2's team have been very helpful and prompt with their replies. I'm sure this is a decision you won't regret.

Below, we’ll show you how to hide a WooCommerce category from the shop page using WooCommerce Protected Categories.

Step 1: Choose which categories to hide

Once you’ve installed and activated WooCommerce Protected Categories, go to Products → Categories to choose which categories to hide from the shop page.

You can either create a new category to house your hidden products or you can edit an existing category. Whichever method you choose, you’ll see a new Visibility section at the bottom of the page. Click the ‘Protected’ option, and choose between:

  • Unlock WooCommerce category for logged in usersPassword protected Visitors will need to enter a password to see the category. You can create multiple passwords to unlock the category if desired.
  • User roles Your category will only be visible to certain user roles.
  • Users Your category will only be visible to the users that you select here.

Once you’ve hidden one or more categories via either method, go to WooCommerce → Settings → Products → Protected categories to configure a few more basic settings.

Step 2a: Configure settings for your WooCommerce protected categories

One especially important group of settings is Category Visibility.

If you want to completely remove a Woo category from the shop page, you should uncheck both boxes. Alternatively, tick both boxes to still display the category, but require users to enter a password or login to see its contents.

Use the other settings to control your password login form, and what happens when a logged out user tries to access a protected category:

WooCommerce Protected Categories Visibility Settings

How can people access my hidden categories?

Once you’ve hidden categories from the WooCommerce shop page, you’ll want to provide other ways for selected customers to access them. There are a few ways to do this, depending on how you plan to use your hidden categories and products:

  • Providing access to WooCommerce password protected categories:
    • Create a central category login form by adding the shortcode [category_login] to any page. Customers will be directed to the hidden category with the password they have entered. Once unlocked, the customer will be able to see the protected category and products on the main Woo shop page. The protected content will remain hidden from everyone else.
    • Tick the ‘Catalog Visibility’ option on the plugin settings page so that the hidden categories and products do appear on the WooCommerce shop page, but customers must enter a password to access the content within.
    • Tick the ‘Catalog Visibility’ option to show the hidden categories and products in menus and widgets. For example, this will allow you to add menu links to your hidden categories, and to show the hidden products in WooCommerce ‘Products’ widgets.
  • Providing access for user or role protected WooCommerce categories:
    • User and role restricted categories and their products will automatically appear when a customer with the correct privileges logs into their user account. The hidden categories and products will then appear everywhere in your store, such as the main WooCommerce shop page, in navigation menus and widgets. The hidden categories will remain invisible to all other users.
    • If you want to automatically redirect users to a specific category when they log into their account, then we recommend the free Peter’s Login Redirect plugin. This lets you choose where specific roles or users are forwarded after logging in.

Don’t mess with code, just use WooCommerce Protected Categories

With WooCommerce Protected Categories, you can hide a WC category from the shop page in just a couple minutes without writing a single line of code. Do this for as many product categories as you like.

For more information, you can see a live demo or consult the detailed documentation.

WooCommerce Protected Categories
Start hiding WooCommerce categories from the shop page today.

And if you have any other questions about how to hide a WooCommerce category from the shop page, leave a comment and we’ll do our best to help.

Colin Newcomer

Colin Newcomer is a freelance WordPress writer for hire with a background in SEO and affiliate marketing. He helps clients grow their web visibility by writing primarily about digital marketing and WordPress. You can hire him to write for your website.

16 Comments

  1. David
    June 17, 2020 Reply

    Hello,
    i have purchased this plug-in but i have an issue... when i hide a category(private), all the products wich also belong to a public category disappear in these public categories.
    My question is, is it possible to hide a category and display some products of the same category somewhere else?

    • Ron Silvosa
      June 17, 2020 Reply

      Hi David, thanks for your inquiry. All products inherit the protection applied to the category.

      In your case, the product will be private. The product can only be unlocked by a user who is logged in and has privileges to view private products (normally Administrators and Store Managers).

      It is advisable that you create a copy of the product using the Duplicate Post plugin which makes it easy to clone WooCommerce products.

      This way, you can set the duplicate product in the other non-private category as its separate product.

      I hope this helps. Let us know if you have further questions.

  2. Ciaran Meagher
    April 3, 2020 Reply

    Hi
    We are designing a WooCommerce store for a Paint and Wallpaper store. The 2 "top" level categories are "Paint" and "Wallpaper" - both have numerous sub-categories (Brand / Collection / Colour etc).
    What I am trying to achieve is the one of my shop pages will be purely for displaying Paint (and its sub categories) only, and another page displaying Wallpaper (and its sub categories) only, but without the requirement for customers to enter a password.

    In simple terms, I need the flexibility of hiding certain categories on certain pages, and displaying them on another, without password entry.

    Do you have a solution fo rthis?

    Kind regards

    Ciaran

    • EJ
      June 3, 2020 Reply

      Hi, Ciaran. Thanks for your comment and my apologies for the late reply.

      If I understand correctly, I believe what you would like to have are categories that are private/protected/hidden on some pages whilst public on others.

      Please note that there is no grey area in hiding/protecting categories. A public category will be public anywhere on the site and a hidden/protected category will not be public anywhere on the site.

      As a workaround for what you would like to achieve, I suggest you instead have 2 identical categories, each with their identical copies/set of products. One will be the public version of the category and its products and the other the hidden/protected one. This way you can decide whether to display the public or the protected category version on your pages.

      You can easily create copies of your products using the free Duplicate Post plugin + use the Group Stock Manager plugin to allow you to share stock quantity between the duplicate products in each category (to help you track inventory across the duplicates).

      I hope this makes sense and helps. Should you have any other questions, you can get in touch with us much sooner via our dedicated Support Center.

      Best regards and keep safe.

  3. Mark
    January 24, 2020 Reply

    Hi, I am looking at purchasing the protected categories plugin. We don't want to show the category 'sold' in our store. But on a separate page we do want to show the 'Sold' stock. Is this plugin the right choice for us?

    • EJ
      March 4, 2020 Reply

      Hi, Mark. Thanks for your comment and sorry for the late reply here. I believe you also sent a similar enquiry via our Support Center, which we replied to right away. For those who might have a similar concern, I'm including my reply below:

      You can hide a category from being publicly visible on your shop page by making the category protected (See: Password protected, user and role protected categories) and then ensuring that the Category Visibility options in the plugin settings are not enabled/checked/ticked.

      The category page or category archive page would be where you can show the protected category and the products it contains. When going to the category's address or URL, users who have the password or have access to the category via User or User Role protection will need to log in. To allow for this, you should set the When logged out page to be either your site's WordPress login page or a custom page, which should be a central password login page.

  4. Emily Andros
    November 7, 2019 Reply

    Hi guys - nice plugin - I don't want to remove the product itself, i just don't like that big long list of categories (and tags) under my products in the shop. Will your plug in let me get rid of that list of categories and tags but still have the product show up for everyone?

  5. Jan Gollan
    June 6, 2019 Reply

    Hi Katie,
    I’m wanting to allow advanced access to my wholesale/professional customers for a set period of time before I make my new range available to the public.
    I don’t want overt signs on my site indicating that we treat them differently (which we don’t except for advanced viewing) and, as such, I would like to send out a specific link to my wholesale/professional customers on the announcement newsletter, one which brings them into the site with the hidden products visible - but still hidden to the public.
    Is this possible and are there variations on this theme (such as requiring and not requiring a password also)?

    • EJ
      June 27, 2019 Reply

      Hi, Jan. Apologies for the late reply. You can have both a public (won't require a password to view products) and private store (password protected product categories) on your site. I believe Method 2 shows you just what you're looking for in our tutorial: 2 Easy Plugins to Create a WooCommerce Hidden Store.

  6. Connie Zimmermann
    February 11, 2019 Reply

    Hi, I have an Affiliate Marketing shopping site featuring products, using WooCommerce with Datafeedr to feed the products. Periodically a Merchant will go temporarily offline from the Affiliate Network they belong to. In that case I need to be able to "hide" the Category so that I don't have to delete it. The subcategories won't show up if the main category is not visible, so I think that would solve my problem. Am I understanding properly that this is what this plugin is intended to do?

    • Katie Keith
      February 12, 2019 Reply

      Hi Connie, yes you can use the plugin for that. It's really easy to temporarily hide a category as you just edit the category (under Products > Categories) and use the visibility settings to restrict it. You can then set it back to Public when the affiliate is available again.

      On the WooCommerce Protected Categories plugin settings page, there are settings that let you choose whether to show or hide products from protected categories in the public parts of your store. You should leave these disabled for your user case, and then the affiliate's products will be completely hidden from public view.

      • Connie Zimmermann
        February 13, 2019 Reply

        Hi Katie, thanks so much for your quick reply. I am going to order your plugin. This will really help, as Merchants come and go from time to time, and it is so much work to remove them and then add them back. It is so unprofessional when I have links that are broken due to the Merchant dropping, and this will help me resolve the situation quickly. Thanks again!

        • Katie Keith
          February 14, 2019

          Glad it was helpful, give us a shout if you have any questions when you set it up!

  7. Jeremy
    October 22, 2018 Reply

    Hi...thanks for the write up.

    Question...if I have a WooCommerce product/service that I want to display on my website on a "normal page" (for navigation lets say in the Main Menu under Training or Services) but that I DO NOT want to display in my SHOP can I...

    1) Setup a WooCommerce Category (say Services or Training) and then hide that Category using the plugin you mentioned...
    2) Ensure my product/service is in the Services/Training category...
    2) Then allow ANYONE (logged in users and guests) to view/access the Product/Service simply by adding a Custom HTML Menu item with a link to the Product/Services URL...

    Or am I missing something?

    Thanks

    • Katie Keith
      October 23, 2018 Reply

      Yes, you can do this. You can manually add information about the hidden product to a normal page on your site, and/or you can add a Custom menu link to the hidden product. When someone clicks on a link to the hidden product, they will have to login or enter the password (depending on how you have chosen to protect it) before they can access the single product page or add it to the cart.

Please share your thoughts...

Your email address will not be published.