Hi have a custom post type "FAQ". I got some "FAQ's" that are private, also only visible for logged in users.
I used "get_terms()" funktion for a widget that is listing links to the categories of those "FAQ's".
The "get_terms" does not list the terms, that have only private "FAQ's".
$taxonomy = 'faq_kategorien';
$tax_terms = get_terms($taxonomy);
foreach ($tax_terms as $tax_term) {
echo '<li><a href="/faq_kategorien/'.$tax_term->slug.'">'.$tax_term->name.'</a></li>';
}
How can i get those terms that include only "private" posts ?
get_terms($taxonomy, array('hide_empty'=>false));
, but it might be more complex than that.