1. Home
  2. Knowledge Base
  3. WooCommerce Protected Categories
  4. Developer Documentation

How to target password protected categories via CSS

Sometimes you might need to target password protected categories and their products - for example, to order to hide the breadcrumb trail on these pages.

The plugin sets a class on the <body> element for any password protected category or product, which you can use to target these pages. The class is: category-password-required

For example, if you want to hide a breadcrumb trail which has a class of breadcrumbs, you could add the following CSS:

.category-password-required .breadcrumbs {
    display: none !important;
}

You can add this to your theme's style.css file, or to the Additional CSS option in the Customizer.

Related Articles

If searching the knowledge base hasn't answered your question, please contact support.