Website Building » WooCommerce » How do I hide tags and categories in WooCommerce?

How do I hide tags and categories in WooCommerce?

Last updated on September 24, 2022 @ 10:22 pm

When building a shop, one of the first steps is to decide on the structure of the product catalog. This can involve deciding which tags to use, as well as categorizing products.

Sometimes, it can be helpful to hide tags and categories to keep the catalog more organized and concise.

WooCommerce offers a few different ways to hide tags and categories. The most common way is to use the custom post type filters.

This allows you to add a hidden field called ‘_cat’ to each post, which will automatically set the category and tag for the post.

PRO TIP: If you are thinking about hiding tags and categories in WooCommerce, be aware that doing so may negatively affect your store’s performance. This is because when tags and categories are hidden, WooCommerce no longer has a way to keep track of which products are associated with which tags and categories. As a result, your store may have difficulty keeping track of inventory levels, order fulfillment, and other important aspects of running a successful business.

Another way to hide tags and categories is to use the ‘_cat’ field in the wc_product_categories table. This field stores the category and tag for each product, and can be used to hide or show the tags and categories for a product.

If you want to hide all the tags and categories for a product, you can use the ‘_hidden’ flag in the wc_product_categories table. This will hide the category and tag for the product, but it will still show up in the WooCommerce product pages and product archive.

The final way to hide tags and categories is to use the ‘_hidden’ flag in the wc_product_tags table. This will hide the tags and category for the product, but it will still show up in the WooCommerce product pages and product archive.

Overall, hiding tags and categories in WooCommerce can be done in a few different ways. The most common way is to use the custom post type filters, but you can also use the ‘_cat’ field in the wc_product_categories table, the ‘_hidden’ flag in the wc_product_tags table, or the ‘_hidden’ flag in the wc_product_categories table and the wc_product_tags table.

Drew Clemente

Drew Clemente

Devops & Sysadmin engineer. I basically build infrastructure online.