Change a Private Taxonomy to a Public Taxonomy in WordPress
In WordPress there are two types of taxonomy: public and private.
A public taxonomy is designed to be seen and used by your site visitors. Some good examples of public taxonomies are Tags and Categories for WordPress posts, or Product Tags and Product Categories in WooCommerce. When you add terms to these taxonomies, you normally want them to be “public” so that visitors can see them.
A private taxonomy is designed to be hidden from your visitors. In WordPress you’ll find private taxonomies used for background tasks, such as organizing navigation menus. WooCommerce also uses private taxonomies to control product visibility and product types. Here’s how to create a new private taxonomy.
The TaxoPress plugin offers the ability to change taxonomies from private and public. In this guide, I’ll show how that works and also illustrate the difference between these two options.
We’re going to change the “Tags” taxonomy from public to private. In this screenshot below, you can see Tags on a WordPress post:
- Inside the TaxoPress plugin, go to the “Taxonomies” screen.
- Click “Edit” for the “Tags” taxonomy.
- Click the “Advanced” tab.
- Uncheck this box: “The taxonomy is for public use. It can be seen by frontend users.”
- Uncheck this box: “The taxonomy is publicly queryable.”
- Click “Save Taxonomy”.
- Now when you visit the front of your site, the Tags will be missing. Your “Tags” taxonomy is now set to private.
You can move taxonomies in the opposite direction also. Using TaxoPress, you change the taxonomies from being private to being public. Let’s see an example using WooCommerce Product Attributes, which are normally set to be private.
- Inside the TaxoPress plugin, go to the “Taxonomies” screen.
- Choose “Private Taxonomies” from the dropdown menu.
- Choose your WooCommerce product attribute. In this screenshot, my attribute is “Product Clothing Color”.
- Click the “Advanced” tab.
- Check this box: “The taxonomy is for public use. It can be seen by frontend users.”
- Check this box: “The taxonomy is publicly queryable.”
- Click “Save Taxonomy”.
Now that this taxonomy is public, you can display the terms on the frontend of your site. If you’re using TaxoPress, you can use the “Terms Display” feature to show terms from this taxonomy to your visitors. In TaxoPress, go to “Terms Display” and you’ll be able to choose your newly public taxonomy.