|
private taxonomy
Started by: Gretchen Louise
in: Types Community Support
Quick solution available
Problem: Taxonomy terms that should only be visible inside the WP admin area are being output in the post element's HTML classes. How can I make a taxonomy private so that no one on the front-end of the site can see these terms.
Solution: Setting a taxonomy's public flag to "false" will make the taxonomy hidden in the wp-admin area, so this setting cannot be utilized to restrict visibility of a taxonomy to wp-admin users only. Use custom fields for internal classification instead of taxonomy terms, or write a custom PHP solution that filters your taxonomy terms from the post class names array provided by the function get_post_class().
Relevant Documentation: https://codex.wordpress.org/Function_Reference/get_post_class
https://codex.wordpress.org/Function_Reference/register_taxonomy#Example_Private_Taxonomy
|
|
2 |
11 |
7 years, 9 months ago
Gretchen Louise
|