I'm building a marketplace site using woocommerce, wcvendors pro, buddyboss marketplace and buddypress.
I'd like for the admin to have an admin-only taxonomy that she can use to tag/categorise certain products for use in featured blocks on the home page, for example.
What would be the best approach for this? Thanks!
I'm building a marketplace site using woocommerce, wcvendors pro, buddyboss marketplace and buddypress.
I'd like for the admin to have an admin-only taxonomy that she can use to tag/categorise certain products for use in featured blocks on the home page, for example.
What would be the best approach for this? Thanks!
Share Improve this question asked Dec 29, 2020 at 20:45 Austen OsborneAusten Osborne 571 silver badge6 bronze badges1 Answer
Reset to default 0When registering the taxonomy just set public
to false
, and it' won't be accessible on the front end. Just make sure to specify show_ui
to true
, otherwise it will use the public value and be hidden.
register_taxonomy(
'my_taxonomy',
'product',
[
'public' => false,
'show_ui' => true,
]
);
If you're registering the taxonomy with a GUI from a plugin it should have checkboxes for these options.